Search Results

Search found 604 results on 25 pages for 'matty brown'.

Page 17/25 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • SQL SERVER – Solution – Puzzle – Statistics are not Updated but are Created Once

    - by pinaldave
    Earlier I asked puzzle why statistics are not updated. Read the complete details over here: Statistics are not Updated but are Created Once In the question I have demonstrated even though statistics should have been updated after lots of insert in the table are not updated.(Read the details SQL SERVER – When are Statistics Updated – What triggers Statistics to Update) In this example I have created following situation: Create Table Insert 1000 Records Check the Statistics Now insert 10 times more 10,000 indexes Check the Statistics – it will be NOT updated Auto Update Statistics and Auto Create Statistics for database is TRUE Now I have requested two things in the example 1) Why this is happening? 2) How to fix this issue? I have many answers – here is the how I fixed it which has resolved the issue for me. NOTE: There are multiple answers to this problem and I will do my best to list all. Solution: Create nonclustered Index on column City Here is the working example for the same. Let us understand this script and there is added explanation at the end. -- Execution Plans Difference -- Estimated Execution Plan Vs Actual Execution Plan -- Create Sample Database CREATE DATABASE SampleDB GO USE SampleDB GO -- Create Table CREATE TABLE ExecTable (ID INT, FirstName VARCHAR(100), LastName VARCHAR(100), City VARCHAR(100)) GO CREATE NONCLUSTERED INDEX IX_ExecTable1 ON ExecTable (City); GO -- Insert One Thousand Records -- INSERT 1 INSERT INTO ExecTable (ID,FirstName,LastName,City) SELECT TOP 1000 ROW_NUMBER() OVER (ORDER BY a.name) RowID, 'Bob', CASE WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%2 = 1 THEN 'Smith' ELSE 'Brown' END, CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%20 = 1 THEN 'New York' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 5 THEN 'San Marino' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 3 THEN 'Los Angeles' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 7 THEN 'La Cinega' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 13 THEN 'San Diego' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 17 THEN 'Las Vegas' ELSE 'Houston' END FROM sys.all_objects a CROSS JOIN sys.all_objects b GO -- Display statistics of the table sp_helpstats N'ExecTable', 'ALL' GO -- Select Statement SELECT FirstName, LastName, City FROM ExecTable WHERE City  = 'New York' GO -- Display statistics of the table sp_helpstats N'ExecTable', 'ALL' GO -- Replace your Statistics over here DBCC SHOW_STATISTICS('ExecTable', IX_ExecTable1); GO -------------------------------------------------------------- -- Round 2 -- Insert One Thousand Records -- INSERT 2 INSERT INTO ExecTable (ID,FirstName,LastName,City) SELECT TOP 1000 ROW_NUMBER() OVER (ORDER BY a.name) RowID, 'Bob', CASE WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%2 = 1 THEN 'Smith' ELSE 'Brown' END, CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%20 = 1 THEN 'New York' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 5 THEN 'San Marino' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 3 THEN 'Los Angeles' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 7 THEN 'La Cinega' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 13 THEN 'San Diego' WHEN  ROW_NUMBER() OVER (ORDER BY a.name)%20 = 17 THEN 'Las Vegas' ELSE 'Houston' END FROM sys.all_objects a CROSS JOIN sys.all_objects b GO -- Select Statement SELECT FirstName, LastName, City FROM ExecTable WHERE City  = 'New York' GO -- Display statistics of the table sp_helpstats N'ExecTable', 'ALL' GO -- Replace your Statistics over here DBCC SHOW_STATISTICS('ExecTable', IX_ExecTable1); GO -- Clean up Database DROP TABLE ExecTable GO When I created non clustered index on the column city, it also created statistics on the same column with same name as index. When we populate the data in the column the index is update – resulting execution plan to be invalided – this leads to the statistics to be updated in next execution of SELECT. This behavior does not happen on Heap or column where index is auto created. If you explicitly update the index, often you can see the statistics are updated as well. You can see this is for sure happening if you follow the tell of John Sansom. John Sansom‘s suggestion: That was fun! Although the column statistics are invalidated by the time the second select statement is executed, the query is not compiled/recompiled but instead the existing query plan is reused. It is the “next” compiled query against the column statistics that will see that they are out of date and will then in turn instantiate the action of updating statistics. You can see this in action by forcing the second statement to recompile. SELECT FirstName, LastName, City FROM ExecTable WHERE City = ‘New York’ option(RECOMPILE) GO Kevin Cross also have another suggestion: I agree with John. It is reusing the Execution Plan. Aside from OPTION(RECOMPILE), clearing the Execution Plan Cache before the subsequent tests will also work. i.e., run this before round 2: ————————————————————– – Clear execution plan cache before next test DBCC FREEPROCCACHE WITH NO_INFOMSGS; ————————————————————– Nice puzzle! Kevin As this was puzzle John and Kevin both got the correct answer, there was no condition for answer to be part of best practices. I know John and he is finest DBA around – his tremendous knowledge has always impressed me. John and Kevin both will agree that clearing cache either using DBCC FREEPROCCACHE and recompiling each query every time is for sure not good advice on production server. It is correct answer but not best practice. By the way, if you have better solution or have better suggestion please advise. I am open to change my answer and publish further improvement to this solution. On very separate note, I like to have clustered index on my Primary Key, which I have not mentioned here as it is out of the scope of this puzzle. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, Readers Contribution, Readers Question, SQL, SQL Authority, SQL Index, SQL Puzzle, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: Statistics

    Read the article

  • Reverse Search Images Easily with the TinEye Client for Windows

    - by Asian Angel
    Are you a frequent user of TinEye and would like to integrate it into your favorite Windows system? Then get ready to enjoy Context Menu and App Window goodness with the TinEye Client for Windows. After you have downloaded the zip file, unzip it and run the setup file inside. Once the installation process has finished you will be asked if you would like to launch TinEye Client immediately or not. If not then you can access it later using the new shortcut added to the Start Menu. We chose to let the program launch automatically…this is what the main window looks like. For our test we decided to access the client via the Context Menu using a picture of Doc Brown’s DeLorean in hover conversion mode. HTG Explains: Understanding Routers, Switches, and Network Hardware How to Use Offline Files in Windows to Cache Your Networked Files Offline How to See What Web Sites Your Computer is Secretly Connecting To

    Read the article

  • Phoenix Silverlight UserGroup tonight

    - by Dave Campbell
    Yes it really is the first Wednesday of the month! and Yes, we are having our normally scheduled meeting tonight. Everyone should be back from any Memorial Day festivities, dragging your collective drawers at work and looking for somethign interesting. Voila!... the Silverlight User Group meeting from 6PM to 8PM at Interface Technical Training (NW corner of Central & Thomas) -- check PhoenixSilverlight.net for a map. Come out for Pizza and networking at 6 then hang around because Les Brown of Sogeti is returning to speak on the new features in in .NET 4.0 as a project-based demo. I've got some fun give-aways, so come on out... it'll be too hot on tonight to be anywhere else :)

    Read the article

  • Reviewing Orace ADF Enterprise Application Development Made Simple Book

    - by Grant Ronald
    Although I was a technical reviewer of Oracle ADF Enterprise Application Development-Made Simple (by Sten Vesterli) it is nice to get the finished article in your hands as a real tangible book. Personally, on a sun lounger with a Dan Brown book I can read 300 pages a day, but technical books are a different beast and I find it hard to get through them with the same vigour.  However, I'm up to chapter 7 in Sten's book and so far it's holding my interest.  He writes in an almost conversational tone and I really like the comparisons to "real world" concepts - like page templates being like gingerbread cookie cutters.  Personally I like to be able to compare or size up a new concept against something I already know. I'll post a full review next week but the good news is 212 pages in and I'm still reading!

    Read the article

  • How to find Sub-trees in non-binary tree

    - by kenny
    I have a non-binary tree. I want to find all "sub-trees" that are connected to root. Sub-tree is a a link group of tree nodes. every group is colored in it's own color. What would be be the best approach? Run recursion down and up for every node? The data structure of every treenode is a list of children, list of parents. (the type of children and parents are treenodes) Clarification: Group defined if there is a kind of "closure" between nodes where root itself is not part of the closure. As you can see from the graph you can't travel from pink to other nodes (you CAN NOT use root). From brown node you can travel to it's child so this form another group. Finally you can travel from any cyan node to other cyan nodes so the form another group

    Read the article

  • How can I approach creating an efficient algorithm for maximizing value with these specific constraints?

    - by sway
    I'm having trouble coming up with an approach that isn't n^2 for this problem. Here's a contrived, simplified version I've come up with: Let's say you're a company that needs 4 employees to launch in a new city, a manager, two salespeople, and a customer support rep, and you magically know how much impact every candidate will have and how much salary they require to take the job. Your table of potential employees looks something like this: Name Position Salary Impact Adam Smith Manager 60,000 11 Allison Brown Salesperson 40,000 9 Brad Stewart Manager 55,000 9 ...etc (thousands of records) What algorithmic approach can be taken to find the maximum "impact" while still filling all the positions and remaining under, say, a 200,000 budget? Thanks!

    Read the article

  • SEO URL structure for tag search on site

    - by Theo G
    I am looking to add tags to each product on my site e.g. brown, x products under £x, second hand x, refurbished x etc. Once you click these tags it will then search for other tags that are similar. I was thinking of using a url structure of www.site.com/tags/this%is%the%tag%name and then simply have a page that shows the results of all the products with that tag. I heard a while back that google generally ignores or downgrades anything with ‘search’ in the url and was wondering if anyone had any experience with this? Also, would you say /tags/ is a pretty valid destination or is it best to break it down and add more levels e.g. /product-type/product%variation Thanks in advance!

    Read the article

  • How to change sample text in font installer

    - by Tony Martin
    I have several Japanese fonts but do not want to install them all. I would like to preview them before installing. In icon view I can get a very rough idea of the style of the font as it shows Aa. When I open the font I am presented with a dialog box which shows a sample of the font with the sentence The quick brown fox jumped over the lazy dog. I would like to change this sample text to Japanese text to get a fuller preview of the font. Is it at all possible? I suspect I might have to edit and compile source, not something I'm very familiar with.

    Read the article

  • hp XW8000 work station power supply

    - by user281745
    My power supply went up in the XW8000 and I bought a new corsair cx500. I installed it but when I hook it up and I turn the computer on I get a beeping noise from the computer. I looked at the old power supply and the new power supply. The only difference is that the new power supply has 500 watts and the old one is 450 watts and the old PSU has a brown wire and the new power supply has 2 orange wires at the end. I found out that it is a sense wire that is in a different location so I was wondering how do I fix this problem.

    Read the article

  • Radeon HD5670 hangs after login

    - by pKaresz
    Thanks in advance for your advices. I installed, Ubuntu 12.04 today, on my PC with a Radeon hd5670 graphics card. The first error I encountered, (just like the first time Unity came out - after witch I waited to try Ubuntu again until now) is, that it hanged after login at the desktop wallpaper, with only the mouse cursor. Well actually the first problem was with the live CD, but I managed to install it, using the install now, not the try now. Live CD has the same problem, as after install. So, after installing and getting the error, I searched of course before asking this:) I found this: Ubuntu hangs at purple screen The accepted answer there helped me to get to this. (note, that the below picture is a screen taken from a working desktop, and then erased the parts that don't show on mine.) Note that there is nothing at the top except the brown bar. No shutdown button, no nothing. The system hangs, I can't click on anything, I can only wiggle around with my mouse XD

    Read the article

  • newbie in c and issue with integers [migrated]

    - by user2527918
    // // main.c // cmd4 // // Created by Kevin Rudd on 27/06/13. // Copyright (c) 2013 Charlie Brown. All rights reserved. // #include <stdio.h> int main(int argc, const char * argv[]) { int x =10, y =20, b = 500; int z = x*y; int f = z/b; // insert code here... printf("x is:%d, y is:%d, b is %d\n",x,y,b); printf("x times y is: %d\n",z); printf("z divided by b is: %d\n",f); return 0; } on print out f = 0. Why?

    Read the article

  • Moving Data From Excel to SQL Server - 10 Steps to Follow

    SQL Server Integration Services provide a versatile way of reading Excel files into SQL Server. A task like this illustrates the advantages of the graphical approach of SSIS. Andy Brown explains. Want to work faster with SQL Server?If you want to work faster try out the SQL Toolbelt. "The SQL Toolbelt provides tools that database developers as well as DBAs should not live without." William Van Orden. Download the SQL Toolbelt here.

    Read the article

  • Flash 10.1 dépasse les 85% de part de marché, et pourrait atteindre 90% dans six mois d'après Adobe

    Flash 10.1 dépasse les 85% de part de marché, et pourrait atteindre 90% dans six mois d'après Adobe Mise à jour du 10.01.2011 par Katleen Adobe vient de révéler ses dernières statistiques concernant Flash. Si le plug-in est devenu un incontournable sur les ordinateurs du globe (il équipe plus de 98% des PC), toutes les machines ne sont malheureusement pas à jour. Et pourtant, il est important d'avoir la dernière mouture en date : pour des questions de sécurité, mais aussi de compatibilité avec les applications les plus récentes. Adobe a donc demandé à Millward Brown de voir ce qu'il en était. C'est chose faite, et les résultats sont là : en décembre 2010, Flash 10.1 était installé sur 85.3% des PCs présents su...

    Read the article

  • asp.net mvc2 - controller for master page and code organization

    - by ile
    I've just finished my first ASP.NET MVC (2) CMS. Next step is to build website that will show data from CMS's database. This is website design: #1 (Red box) - displays article categories. ViewModel: public class CategoriesDisplay { public CategoriesDisplay() { } public int CategoryID { set; get; } public string CategoryTitle { set; get; } } #2 (Brown box) - displays last x articles; skips those from green box #3. Viewmodel: public class ArticleDisplay { public ArticleDisplay() { } public int CategoryID { set; get; } public string CategoryTitle { set; get; } public int ArticleID { set; get; } public string ArticleTitle { set; get; } public string URLArticleTitle { set; get; } public DateTime ArticleDate; public string ArticleContent { set; get; } } #3 (green box) - Displays last x articles. Uses the same ViewModel as brown box #2 #4 (blue box) - Displays list of upcoming events. Uses dataContext.Model.Event as ViewModel Boxes #1, #2 and #4 will repeat all over the site and they are part of Master Page. So, my question is: what is the best way to transfer this data from Model to Controller and finally to View pages? Should I make a controller for master page and ViewModel class that will wrap all this classes together OR Should I create partial Views for every of these boxes and make each of them inherit appropriate class (if it is even possible that it works this way?) OR Should I put this repeated code in all controllers and all additional data transfer via ViewData, which would be probably the worse way :) OR There is maybe a better and more simple way but I don't know/see it? Thanks in advance, Ile EDIT: If your answer is #1, then please explain how to make a controller for master page! EDIT 2: In this tutorial is described how to pass data to master page using abstract class: http://www.asp.net/LEARN/mvc/tutorial-13-cs.aspx In "Listing 5 – Controllers\MoviesController.cs", data is retrieved directly from database using LINQ, not from repository. So, I wonder if this is just in this tutorial, or there is some trick here and repository can't/shouldn't be used?

    Read the article

  • stop javascript execution

    - by alemjerus
    When I run javascript script file in windows command line environment, and there is a free text coming after my code. How can I stop javascript interpreter to run into it? For example: var fso = new ActiveXObject("Scription.FileSystemObject"); delete fso; exit(); // some kind of WORKING exit command Lazy frog ate a big brown fox.

    Read the article

  • JQuery removeClass wildcard

    - by Jasie
    Is there any easy way to remove all classes matching, for example, color-* so if I have an element: <div id="hello" class="color-red color-brown foo bar"></div> after removing, it would be <div id="hello" class="foo bar"></div> Thanks!

    Read the article

  • create parent child array from inline data in php

    - by abhie
    actually i have simple problem but i forget how to solve it.. :D i have data on table with following format 01 Johson 01 Craig 01 Johson 02 Daniel 01 Johson 03 Abbey 02 Dawson 01 Brown 02 Dawson 02 Agust 03 Brick 01 Chev 03 Brick 01 Flinch so i want it to become an array like this 01 Johson => 01 Craig ``````````````02 Daniel ```````````````03 Abey ` etc... how to iterate trough the data and make it array like that... i'm newby in PHP :))

    Read the article

  • YAML in TextMate, color coding wrong?

    - by Victor P
    Im using TextMate to create a YAML document, but the keys and the values have all the same color (brown). Would be more intuitive to have keys and values rendered in different colors, like HTML, CSS, etc Am I missing something? Thanks

    Read the article

  • Linux tail only whole words

    - by Andrew
    Hello, I need to print last 20 characters of string, but only whole words. Delimiter is a space "". Let's consider this example: string="The quick brown fox jumps over the lazy dog" echo $string | tail -c20 returns s over the lazy dog. And I need it to return over the lazy dog instead. Do you know how to accomplish that? Thanks!

    Read the article

  • Experimental IDE concepts

    - by efbenson
    I am interesting and building a new style IDE for a side project. Mainly to do away with the normal notepad on steroids IDE. I am looking for some inspiration for things that have been tried or that you have seen (or not) that looked cool and would be useful to have in an IDE. Things that I can up with are: http://digitaltools.node3000.com/blog/1052-field-experimental-programming-suite http://www.cs.brown.edu/people/acb/codebubbles_site.htm

    Read the article

  • set the focus on the scroller when button is clicked

    - by liz
    hi i have a script <script type="text/javascript"> window.addEvent('domready', function(){ var totIncrement = 0; var increment = 560; var maxRightIncrement = increment*(-6); var fx = new Fx.Style('slider-list', 'margin-left', { duration: 1000, transition: Fx.Transitions.Back.easeInOut, wait: true }); //------------------------------------- // EVENTS for the button "previous" $('previous').addEvents({ 'click' : function(event){ if(totIncrement<0){ totIncrement = totIncrement+increment; fx.stop() fx.start(totIncrement); } } }); //------------------------------------- // EVENTS for the button "next" $('next').addEvents({ 'click' : function(event){ if(totIncrement>maxRightIncrement){ totIncrement = totIncrement-increment; fx.stop() fx.start(totIncrement); } } }) }); </script> in mootools v1.1 it makes a scroller function at the bottom of my html page. but when i click the next button the page's focus moves to the top of the page. how do i keep it on the scroller? this is the html fragment: <h3>Our Pastas</h3> <div id="slider-buttons"> <a href="#" id="previous">Previous</a> | <a href="#" id="next">Next</a&gt; </div> <div id="slider-stage"> <ul id="slider-list"> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/long-pasta-in-brown-bags/bucatini"><img src="xxx/images/stories/products/_thumb1/bucatini.gif"></a></div><h4><a href="xxx/product-catalog/pasta/long-pasta-in-brown-bags/bucatini">Rustichella d'Abruzzo Bucatini</a></h4> </li> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/pasta-in-trays/calamarata"><img src="xxx/images/stories/products/_thumb1/calamarata.jpg"></a></div><h4><a href="xxx/product-catalog/pasta/pasta-in-trays/calamarata">Rustichella d'Abruzzo Calamarata</a></h4> </li> <li class="list_item"> <div id="thumbnail"><a href="xxx/product-catalog/pasta/pasta-in-trays/cannolicchi"><img src="xxx/images/stories/products/_thumb1/cannolicchi.jpg"></a></div><h4><a href="xxx/product-catalog/pasta/pasta-in-trays/cannolicchi">Rustichella d'Abruzzo Cannolicchi</a></h4> </li> </ul></div>

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >