A SQL Tuning Set (STS) in Oracle is a database object that includes one or more SQL statements along with their execution statistics and context. It provides a means to store SQL statements for future use, such as input to the SQL Tuning Advisor or SQL Access Advisor, capturing workloads to move them from one […]
How to set statistics for Table/index/column in Oracle
Sometimes, you want to modify the statistics for testing purposes or some other things. Oracle has provided a standard procedure to set the statistics for the Table/index/column. In this post, we will check out how to do it How to set statistics for Table This is done using the SET_TABLE_STATS procedure of the DBMS_STATS package […]
How to delete statistics from Table/index/column in Oracle
We may sometimes need to delete the statistics on the Table/index/column in Oracle. In this post we will check out how we can do it with standard oracle defined procedures How to delete statistics from Table Oracle has provided a procedure in DBMS_STATS Package Here cascade parameters are default true which means when table stats […]
How to replace sql plan by another sql id sql plan
We have a condition where a query is performing poorly and sql tuning advisor is not helping, we dont have a good plan also, so a custom sql profile can also not be created. The only solution is adding manual hints in the query but it is not possible to change the code. In this […]
How to get the outline hint in oracle and use for tuning
Outline hints of the sql statement are the hints which are required to reproduce the same plan.This can be useful in many ways(a) You can enforce the same plan on the same query with different literal(b) we could use them between two slightly different queries also(c) These are the same hints used in the custom […]
How to implement custom Sql Profile in Oracle
We all know about SQL profiles in Oracle and How they add hints and scaling factors that help in the Performance of the sql in Oracle. We have two types of sql profile This is the standard one that we get from sql tuning advisor. It tunes the sql statement using hint and scaling factors. […]