SQL query is too slow to attempt to rebuild the index

Source: Internet
Author: User

DBCC showcontig (' Table ')

DBCC dbreindex (' Table ')

Index establishment of the analysis table: DBCC showcontig (' table ')

DBCC showcontig is scanning ' table ' tables ...
Table: ' Table ' (53575229); index id:1, Database id:14
A TABLE-level scan has been performed.
-Number of pages ...........: 228........ £ º
-Number of scan zones ............: 52.......
-Zone switching times ...........: 225....... £ º
-The average number of pages in each area ....: 4.4 ...... £ º..
-Scan density [best count: Actual Count] ...: 12.83% [29:226]
-Logical scan fragment ....: 97.37%-----...
-area Scan fragment ....: 98.08%------
-The average number of bytes available per page ........: 2686.3.....
-Avg. page density (full) ..........: 66.81%.

When you find that the scan density line, the ratio of the best count to the actual count has been severely misaligned, the logical scan fragments accounted for a very large percentage of the average available bytes per page is very large, indicating

Your index needs to be re-organized.

To perform the Rebuild Index command:
DBCC dbreindex (' Table ')
Post-analysis situation

DBCC showcontig is scanning ' table ' tables ...
Table: ' Table ' (53575229); index id:1, Database id:14
A TABLE-level scan has been performed.
-Number of pages ...........: 154........ £ º
-Number of scan zones ............: 20.......
-Zone switching times ...........: 19....... £ º
-The average number of pages in each area ....: 7.7 ...... £ º..
-Scan density [best count: Actual Count] ...: 100% [20:20]
-Logical scan fragment ....: 0%-----...
-area Scan fragment ....: 55%------
-The average number of bytes available per page ........: 86.8.....
-Avg. page density (full) ..........: 98.93%.

SQL query is too slow to attempt to rebuild the index

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.