Solved

oracle optimizer

Posted on 2013-06-18
4
348 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle Database Upgrade 13 62
Oracle Subquery bad Join 11 60
PLSQL procedure help with decode and null input params 5 47
history tablespace temp usage 2 31
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

867 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

19 Experts available now in Live!

Get 1:1 Help Now