Database Administration (MOSC)

MOSC Banner

Oracle execuation plan same when 2 schemas has the same table name & structure

edited Apr 5, 2016 4:14AM in Database Administration (MOSC) 5 commentsAnswered

Hi,

I have the following scenario:

schema HR: has table EMPLOYEES with 1000 rows.

schema SCOTT: has table EMPLOYEES with 100M rows.

both schema has same package with the same structure, "EMP_SECUR", this package has a fuction "CHECK_AUTH" return true or false:

select EMP_SECUR.CHECK_AUTH (p_NAME,p_EMAIL) from dual;

this procedure make a select on EMPLOYEES table to know if the employee allow to login or not:

select * from employees where name = p_name and email = p_email;

how to let the optimizer avoid using the same plan, when the procedure is called from schema SCOTT where the table is very big?!?!?

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