Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Temporary tables, and using SQL tuning tools

654688Jul 23 2009 — edited Jul 23 2009
The application I support uses temporary tables for the majority of queries.. In looking at the SQL tuning advisor, and most other oracle tuning tools, they don't seem to handle temporary tables well.

This is what Happens (from what I can tell).

1) oracle identifies a SQL statement (or the DBA does), to be tuned.
2) The original runtime statistics are saved for comparison
3) Oracle tries to find a new plan (but at this point the temporary table is empty).
4) It tries to execute the new plan (again the temporary table is empty).
5) It comparies the execution time of the new plan against the original plan

The comparison , of course , is not a reasonable comparison.

Does anyone have any experience with this issue ?? My first thought is to "prime" the temporary table, and then execute the tuning advisor in the same session (hoping it will use the values in the temporary table).

other than that, Database Replay seems to be the best way to tune sql plan changes using baselines.
This post has been answered by damorgan on Jul 23 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2009
Added on Jul 23 2009
6 comments
2,743 views