Problem solve Get help with specific problems with your technologies, process and projects.

Query performance degraded after updating statistics

We recently updated statistics on a schema in Oracle 9i. The performance on some queries has degraded significantly. One query in particular has gone from approx. 30 msecs to 20 seconds. Any ideas?

You should trace the queries and see what path the optimizer is taking. You also might consider investigating data...

skew as a source of the problem; if data is very unevenly distributed in a column, the optimizer might be making a bad choice. Consider the use of optimizer histograms if data skew is present.

Whenever you're planning to upgrade statistics, it's a good idea to use DBMS_STATS to save the existing statistics off to another table. You can then switch between the two sets, trace SQL with each, and see exactly how the optimizer's plan has changed.

This was last published in May 2005

Dig Deeper on Oracle database performance problems and tuning

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.