Solved

oracle optimizer

Posted on 2013-06-18
4
351 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 77

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 74

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

752 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