G
Grant
I have a query that performs very well immediately after a compact/
repair, but quickly degrades after the database has been in use
(updating activity) for a short time.
When running quickly, SHOWPLAN output reveals that the Jet optimizer
chooses Rushmore processing on indexes of three columns in the
predicate in order to restrict rows in a table that contains about
200,000 records prior to joining.
After a brief period of system use, which includes updates on the
tables under discussion, the query’s performance slows considerably
and SHOWPLAN reveals that the indexes used previously are no longer
being used, resulting in a scan over most of the 200,000 row table to
resolve the predicate. This causes the query's execution time to
increase from sub-second to 30 seconds; more if the query is running
over a network.
Further, SHOWPLAN output shows statistics about the indexes which
reveals that the number of entries in the indexes do not match the
number of rows in the table. I assume this represents some kind of
degradation, but I do not understand under what circumstances this
occurs. Compact/repair corrects this discrepancy (and the
optimization problem), but it recurs shortly after the application
begins updating the database.
I’m trying to understand why a small amount of updating activity
changes Jet’s optimization so drastically and what I can do to
maintain performance without having to run compact/repair incessantly.
Any observations or suggestions are appreciated. Thanks for your
help!
- Grant
repair, but quickly degrades after the database has been in use
(updating activity) for a short time.
When running quickly, SHOWPLAN output reveals that the Jet optimizer
chooses Rushmore processing on indexes of three columns in the
predicate in order to restrict rows in a table that contains about
200,000 records prior to joining.
After a brief period of system use, which includes updates on the
tables under discussion, the query’s performance slows considerably
and SHOWPLAN reveals that the indexes used previously are no longer
being used, resulting in a scan over most of the 200,000 row table to
resolve the predicate. This causes the query's execution time to
increase from sub-second to 30 seconds; more if the query is running
over a network.
Further, SHOWPLAN output shows statistics about the indexes which
reveals that the number of entries in the indexes do not match the
number of rows in the table. I assume this represents some kind of
degradation, but I do not understand under what circumstances this
occurs. Compact/repair corrects this discrepancy (and the
optimization problem), but it recurs shortly after the application
begins updating the database.
I’m trying to understand why a small amount of updating activity
changes Jet’s optimization so drastically and what I can do to
maintain performance without having to run compact/repair incessantly.
Any observations or suggestions are appreciated. Thanks for your
help!
- Grant