We want to try new indexes and compare their performance with old indexes. But following executions after the first execution of a query returns much much faster then the first one.
So for testing these queries and indexes performance, is there any way to disable this mechanism?
Wouldn’t you want to compare the normal execution of the new vs old? Normally execution would have the indexes in-memory. Only the very first execution would be uncached.
I suppose if you wanted to measure the uncached performance, restarting the server before each test would work.
Is there any mechanism to invalidate the cache without a restart? In my environment we do not have access to do a restart like that and much less when there is production traffic reaching the servers
Why do you want to measure performance with an empty cache? That’s not normal operation.
Because the goal is measure the raw performance of the queries without cache in between to see what query performs better for the worst case scenario where the cached data does not exist and the user is accessing the data for the first time
When the data is cached it gives a false sense of performance because it does not account for the cold access that the test is trying to measure
But following executions after the first execution of a query returns much much faster then the first one.
So just measure the first execution. To repeat, delete and re-create the index.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.