patternsqlMinor
Does Index Rebuild Reduces physical read from disk
Viewed 0 times
reducesdiskreadrebuilddoesphysicalindexfrom
Problem
Recently I have rebuild indexes uisng Ola Hallengreen script which were 99% fragmented. After rebuilt i have noticed the physical reads have reduced a lot. Does this has anything to do with Index Rebuilt ?
Solution
Immediately after you rebuild an index, its pages are more likely to be cached in memory.
Consider this scenario:
This is one of the reasons you don't really wanna use physical reads to gauge the success of your performance tuning efforts. Start by using logical reads instead. (Heck, you could have skipped step #3 altogether and you'd still see less physical reads - but that doesn't mean you should run every query twice in order to reduce physical reads.)
Consider this scenario:
- Your server has a wide variety of queries running, and a wide variety of tables are cached in memory
- You run a query hitting a specific table - say, COUNT(*) from table - and all of its pages were not cached in memory. Your query does a lot of physical reads to bring that data up into cache.
- You rebuild its index.
- You run the query again - but this time, its pages are now cached in memory. You see less physical reads on that query.
This is one of the reasons you don't really wanna use physical reads to gauge the success of your performance tuning efforts. Start by using logical reads instead. (Heck, you could have skipped step #3 altogether and you'd still see less physical reads - but that doesn't mean you should run every query twice in order to reduce physical reads.)
Context
StackExchange Database Administrators Q#211700, answer score: 5
Revisions (0)
No revisions yet.