Stored Outline [message #346851] |
Tue, 09 September 2008 21:05 |
caprikar
Messages: 226 Registered: March 2007
|
Senior Member |
|
|
Hi,
I have oracle 10gR2 database. I have problem with one query which runs fast when i set optimizer_mode=first_rows;
So I decided to generate a outline after setting alter session set optimizer_mode=first_rows; But after using the outline when i look at the plan, it is still different. Can anyone tell me what the problem is? This is what I'm doing-->
1. alter session set create_stored_outlines = TEST
2. alter session set optimizer_mode=first_rows;
3. CREATE OUTLINE GOOD FOR CATEGORY TEST
on <SQL>;
4. alter session set create_stored_outlines=FALSE;
5. ALTER SESSION SET USE_STORED_OUTLINES=TEST;
6. Run the Query and look at the Plan --> plan is not good
The plan is different from the Good plan which I get when i do-->
1. alter session set optimizer_mode=first_rows;
2. Run the Query and check the Plan --> this plan is good.
Thanks.
|
|
|
|