Posts

Showing posts with the label traceflag 2371

SQL Server, statistics, performance and the Ascending key problem

Image
Hi guys, September is coming and it is time for our editorial staff to reopen its doors. I hope you have recharged your batteries to 100%. Today we will talk about statistics and performance . Yes, we have talked about it many times before but today we will focus on an issue that could lead to a poor performance situation .  Maybe your query is poor performing due to this issue? Ready? Go! Statististics and the Ascending Key Problem Statistics need to be updated because they help SQL server create a good execution plan. I like to do an example by making a parallel between extracting data from the database and a trip: if i have to go to work and my office is near me it is better to take a bicycle. If my work is far from me it is better take the car or the train. Likewise, if I need to extract a few records, the optimizer can implement a JOIN by choosing a nested loop. Otherwise it would be better to use other operators such as merge or hash. This is why statistics are important. Be...