patternsqlMinor
Do indexes activate immediately?
Viewed 0 times
activateindexesimmediately
Problem
After you create an index for a table, should we see performance improve immediately? Does the application using it need to re-connect or should it just stay running as normal?
Solution
After an index is created on a table, it can be used immediately by queries. But that doesn't mean the index is going to be used or that the index is going to improve performance immediately. Validate that the index is being used by the query(ies) you were targeting and compare performance differences.
The first time the index is used, the database may have to read the index pages from disk into memory, so it might take a little longer than on subsequent runs when the index may already be in memory.
The first time the index is used, the database may have to read the index pages from disk into memory, so it might take a little longer than on subsequent runs when the index may already be in memory.
Context
StackExchange Database Administrators Q#155509, answer score: 8
Revisions (0)
No revisions yet.