SQL Server creates index statistics

Source: Internet
Author: User

Excerpt from: http://www.cnblogs.com/kerrycode/p/3337817.html

There are three parameters related to database statistics :

Automatically create statistics (auto create Statistics), auto UPDATE statistics (auto update Statistics), Automatic Update statistics automatically (auto update Statistics asynchronously), are database-level.

Recommendation : Automatically create statistics and auto update STATISTICS is set to True, automatic asynchronous update statistics is set to false.

You can see these three parameters by setting it in Enterprise Manager, selecting the database you want to modify, clicking the right-click option "Properties" and selecting "Options" on the left.

Reconstruction:

Index statistics need to be rebuilt periodically, in many ways, such as: DBCC DBREINDEX (' table name ')

The reconstructed effect can be viewed in the following ways: DBCC SHOWCONTIG (' table name ')

Before rebuilding:

A TABLE-level scan has been performed.

-Number of pages ...........: 24........ £ º
-Number of scan zones ............: 3.......
-Zone switching times ...........: 2....... £ º
-The average number of pages in each area ....: 8.0 ...... £ º..
-Scan density [best count: Actual Count] ...: 30%
-Logical scan fragment ....: 0%-----...
-area Scan fragment ....: 0%------
-The average number of bytes available per page .....: 649.7.... £ º
-Avg. page density (full) ..........: 91.97%.
DBCC execution is complete. If DBCC outputs an error message, contact your system administrator.

After rebuilding:

A TABLE-level scan has been performed.
-Number of pages ...........: 24........ £ º
-Number of scan zones ............: 3.......
-Zone switching times ...........: 2....... £ º
-The average number of pages in each area ....: 8.0 ...... £ º..
-Scan density [best count: Actual Count] ...: 100%
-Logical scan fragment ....: 0%-----...
-area Scan fragment ....: 0%------
-The average number of bytes available per page .....: 649.7.... £ º
-Avg. page density (full) ..........: 91.97%.
DBCC execution is complete. If DBCC outputs an error message, contact your system administrator.

Delete

When you delete an index, statistics are automatically deleted

SQL Server creates index statistics

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.