Database Tuning (MOSC)

MOSC Banner

DBMS_OUTLN.CREATE_OUTLINE: how to use execution plan from other query

edited Oct 28, 2018 9:11PM in Database Tuning (MOSC) 5 commentsAnswered

I have 3 similar queries with different sql_id:

1.)

select  *

from tab where cond1 = :1 and cond2 = :2;

2.)

select /*+ index(tab cond1_idx) */ *

from tab where cond1 = :1 and cond2 = :2

3.)

select *

from tab where cond3 = :1 and cond2 = :2 and cond1 := 3

How can I force with dbms_outln.create_outline all stated queries to use execution plan from 2nd query?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center