Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Optimized Query on data dictionary

Optimized Query on data dictionary

From: <jeanch_at_my-deja.com>
Date: Mon, 13 Mar 2000 09:49:03 GMT
Message-ID: <8aidif$fla$1@nnrp1.deja.com>


Folks,

The following query take about 5mn to return results; Obvioulsy it's not acceptable; Has anybody an idea about how to cut down that time please.

Any help is welcomed

Cheers
JC

select distinct (table_name)
from all_cons_columns
where owner = 'SCOTT'
and constraint_name IN
(select r_constraint_name
from all_constraints
where constraint_type = 'R'
and owner = 'SCOTT'
and table_name = 'EMP'
);

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Mar 13 2000 - 03:49:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US