Solved

oracle optimizer

Posted on 2013-06-18
4
347 Views
Last Modified: 2013-06-20
Oracle Optimizer choose the execution plan based on the statistics information .
we can gather the statistics dbms_stats.
What can a dba do to make the oracle optimizer to pick a different execution plan?
0
Comment
Question by:taaz
4 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 100 total points
ID: 39256930
Why do you want to pick a different plan?

That asked:
You can use hints.
You can use stored outlines.

Possibly a couple others.
0
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 200 total points
ID: 39256958
create indexes  -> new options for optimizer

reload data - > changes index clustering factor

change optimizer init parameters -> change optimizer mode, index "weight" and dynamic sampling

change init version and compatibility parameters -> make the optimizer perform as a different version (usually lower unless increasing from a previously lowered value)

rewrite the query -> new query = new plan

use materialized views and query rewrite -> let the optimizer rewrite the query for you using precalculated values

use advanced rewrite -> replace a bad query with a functionally equivalent better query.  Similar to rewriting except you don't need to modify the original source code.

use sql profiles -> let the optimizer learn data distributions from previous executions

collect extended statistics -> uses dbms_stats, but these are a manual effort to define extensions that are valuable
0
 
LVL 15

Assisted Solution

by:Franck Pachot
Franck Pachot earned 200 total points
ID: 39257236
>> What can a dba do to make the oracle optimizer to pick a different execution plan?

alter system set "_optimizer_random_plan"=42;

Open in new window



This is a joke, don't try this on production... it works...
0
 

Author Closing Comment

by:taaz
ID: 39263498
Thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now