Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How Can I force SQL to use a specific plan?
If you can interpret the plan correctly, then one option, open to most versions of Oracle would be to re-arrange the order of the tables in the query to match the plan, then use a list of hints, starting with the
ORDERED
hint, then specifying join types and indexes
used in the plan you want.
If you have Oracle 8.1 you can investigate 'stored outlines'. Look up:
create outline
in the SQL reference manual.
-- Jonathan Lewis http://www.jlcomp.demon.co.uk Host to The Co-Operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html Author of: Practical Oracle 8i: Building Efficient Databases Screen saver or Life saver: http://www.ud.com Use spare CPU to assist in cancer research. jaimin saraiya wrote in message ...Received on Wed Sep 05 2001 - 14:44:19 CDT
>Hello,
>
>I have saved a plan using Explain Plan tool. Now I want to force my
>SQL Statement to always use that plan during execution. How can I do
>this?
>
>Thank you
>
>Regards,
>
>Jaimin