Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Paul.

Asked: January 18, 2017 - 1:28 pm UTC

Last updated: January 18, 2017 - 4:23 pm UTC

Version: 12.1

Viewed 1000+ times

You Asked

Recently I had a performance issue where the solution was to drop the exising SQL profile.
SQL profiles contain "auxiliary statistics specific to a SQL statement".
These can of course get stale if the data in the tables referenced by the statement change a lot.
However in contrast to regular statistics, (the correction factors in) SQL profiles seem to be static once created. At least I cannot find anything in
the documentation stating otherwise.
Or does eg. the tuning advisor revisit them once in a while?


and Chris said...

A SQL profile can become outdated. There isn't a way to refresh it. You need to drop and recreate it.

If a profile isn't doing the job so the statement becomes slow, the automatic tuning task can pick it up. If this happens it'll suggest a new profile for you.

If you're trying to keep plans stable, but still react to significant changes, check out SQL Plan Management (SPM) with baselines. This lock SQL to a particular plan. But there is a process to evolve these:

https://blogs.oracle.com/optimizer/entry/what_is_the_different_between
https://blogs.oracle.com/optimizer/entry/sql_plan_management_part_3_of_4_evolving_sql_plan_baselines_1
https://oracle-base.com/articles/12c/adaptive-sql-plan-management-12cr1#manually-evolving-sql-plan-baselines

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.