In the previous articles I have explained simple methods on how to interpret an AWR report, how to find an expensive SQL and how to tune an expensive SQL. One of the frequent confusions when you use Oracle's own tuning advisor is that of knowing what the difference is between a SQL Profile & SQL Baseline. I will explain it here. In Oracle a SQL Profile creates extra information about a particular SQL that the optimizer can use at run time to select the optimal plan to ensure best performance. In essence the SQL Profile enables dynamic behavior where the optimizer has multiple plans to choose from at run time based on run time bind variables etc. When you run the SQL Tuning Advisor for the list of recommendation you will see that the recommendation specifies whether a SQL can be improved by creating a SQL Profile or SQL Baseline. It is preferable to choose a SQL Profile simply because it allows the optimizer to pick best execution plans at run time. SQL Baseline on the other hand is more of a brute force method, when you simply marry a particular SQL to stay with a specific SQL execution plan. So no matter what the run time bind variables are for a given SQL, the optimizer will always try to use the SQL Baseline plan. This may work fine for most cases but instances where data skew is high it is preferable that one pick more efficient plans based on bind variable values passed at run time instead of always picking the same plan as generated by the SQL Baseline. In any case knowledge of the application data may make you prefer one over the other, in case you are clueless about this, then I would suggest you stick with the SQL Profile.
top of page
Search
Recent Posts
See AllIf your application happens to be one where surrogate keys are used in abundance and if some of those tables are inserted/updated very...
880
One of the simplest and often overlooked act when designing a data model in Oracle is omitting indexes on foreign keys. While I am not a...
750
One of the often overlooked aspect of Oracle RAC is the impact of large changes on heavily accessed tables on overall RAC responsiveness....
250
bottom of page
Комментарии