Q

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 first published in May 2005

Dig deeper on Oracle database performance problems and tuning

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close