Pages

Wednesday 10 July 2013

SQL Server: All About SQL Server Statistics : Consolidated post

Statistics is the one of the important factor which helps the optimizer to choose the right execution plan.At the same time, many of us (so called DBA) will not give enough attention to statistics while troubleshooting the performance issues.It might be because of lack of knowledge in statistics or lack of mechanism to figure out the stale statistics is the root cause of the performance issue.


The query optimizer use the statistics to determine the rows returned in each step.The estimated rows information in the execution plan is calculated based on the statistics available on the columns.The statistics gives the distribution of data with in the column.With out statistics, the query optimizer can not be determine the efficiency of different plan.By using the information stored in the statistics , the query optimizer can make right choice in accessing the data. 

Each statistics in SQL server store information about density vector and Histogram. 
Density
Density is the ratio of unique values with in the given column or a set of columns.Read More
Histogram
 Histogram gives the details of data distribution of leading column of the statistics. Read More
There are two types of the statistics. Index statistics and column statistics. Index statistics are created automatically when we define index on a table. The column statistics are always on single column and it is created automantically when the column is refered in a query. To create the a column statistics automatically ,the auto create statistics should be enabled in the database level.We have discussed in details about how the statistics are getting created, how the autoupdate and auto create statistics works, how stale statistics hits the performance in our post. Read here

SQL server update the statistics automatically after reasonable changes happened in the table. There is a threshold values for triggering auto update statistics.Is that default threshold is good enough for optimal performance? Do we really bothered about updating the statistics manually ? This post will answer for these question 

In SQL server 2005 and 2008, it is difficult task to identify the statistics that need a manual updates. This post will give some idea to start with.

If you liked this post, do like my page on FaceBook

8 comments:





  1. I loved the way you discuss the topic great work thanks for the share, Let me share this, vmware training in pune

    ReplyDelete
  2. I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
    Selenium online training
    Selenium certification training
    Selenium online course
    Selenium training course

    ReplyDelete
  3. اجود وارخص الشركات التي توجد في منطقة مكة المكرمة والتي تعمل في مجال نقل العفش مع الفك والتركيب تلك الشركة الجيدة التي تقدم خدمات جيدة وتسمى اقوى شركة نقل عفش بجدة التي تحافظ على ممتلكاتك ايضا وهي التي تختص بنقل العفش من بيت الى بيت آخر في مدينة جدة وما جاورها من مناطق تابعة لها وقد نضطر قبل نقل العفش الى المكان الجديد الى تنظيف المنزل الجديد قبل النقل من افضل شركات منطقة مكة المكرمة التي تعمل في مجال تنظيف وتعقيم المنازل تلك الشركة الجيدة التي تقدم خدمات جيدة في تنظيف المنازل من الداخل ومن الخارج وتسمى افضل شركة تنظيف منازل بجدة التي تختص بأعمال التنظيف للمنازل الجديدة والمفروشة ومن الأفضل ان تقوم بعمل مكافحة للحشرات بالتواصل مع افضل واقوى الشركات التي تقدم خدمات مكافحة حشرات المنزل البق والصراصير والنمل والعته تلك التي تستخدم مبيدات آمنة وفعالة ومضمونة مثل ارخص شركه مكافحه حشرات بجده من مثيلاتها التي تتعامل في مكافحة الحشرات وتستخدم مبيدات آمنة ومضمونة ونحتاج ايضا الى تنظيف الخزان وذلك بالتعرف على اكبر وافضل واقوى شركات تنظيف خزانات المياه بجدة تلك التي تقوم بأعمال تنظيف وتعقيم خزانات المياه في جدة بمنتهى الدقة والاحترافية وتقدم شركه تنظيف خزانات بجده اقوى وافضل الخدمات الجيدة في تنظيف وتعقيم الخزانات لكي تحافظ على الماء نظيفا ومعقما اطول فترة زمنية ممكنة لكي تكون مياهك نظيفة فان شركه مكافحه حشرات مستعدة لاستقبال مكالمتكم في أي وقت وطلب الخدمة

    ReplyDelete
  4. I loved the way you discuss the topic great work thanks for the share, Bike Accessories

    ReplyDelete