Can rebuilding indexes cause worse performance after the rebuild is finished? On AZURE database #442
Unanswered
HOASTONGE
asked this question in
Questions & Answers
Replies: 1 comment
-
When you rebuild an index, that also updates the statistics. In addition the index rebuild causes the query to be recompiled, in the next execution. Here is an article that describes this in some more detail: I would recommend using Query Store, to see if there have been any changes to the execution plan for this query. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I used to rebuild the database index and Statistics for all Index and is more than 70,000 pages
Server : SQL on Azure
Disk : SSD with 500 GIG
Database weight is over 336 Gig and Is still have 180 Gig free space
Database: MSSQL Microsoft SQL Server 2017 (RTM-CU22) (KB4577467) - 14.0.3356.20 (X64) Aug 20 2020 22:33:27 Copyright (C) 2017 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2019 Datacenter 10.0 (Build 17763: ) (Hypervisor)
This is the script I used : B. Rebuild or reorganize all indexes with fragmentation and update modified statistics on all user databases
When I don’t rebuild Index and Statistique the Query used zero seconds, instant … the Query return only 50 rows that what I need
After I ran the script above the same query run over 6 minutes!
I tought that I used to rebuild you script for my all index but it's worth case when I rebuild
Is there a way to avoid this ? or to use as a plan Maintenance
There is the sample of query is used by the application
Beta Was this translation helpful? Give feedback.
All reactions