Any more efficient way to do this?

From: DL <donlcs_at_yahoo.com>
Date: 9 Nov 2001 11:22:41 -0800
Message-ID: <604bb90c.0111091122.4deddb8f_at_posting.google.com>


Hi,

I'm new to Oracle. What I want is to determine the cardinality of a relationship. The following query can give me what I want, however, it takes
over 8000 MS to process, way too much time, I'm wondering if there's a system procedure or the like to use to shorten query execution. Thanks.

DL

	select distinct cols.column_name as colname,c.nullable
	from dba_constraints cons, dba_cons_columns cols, dba_tab_columns c
			where cons.table_name = cols.table_name 
				and cons.owner = _at_param1				                        and
c.table_name = _at_param2
				and cols.column_name = c.column_name
				and cons.constraint_name = cols.constraint_name
				and cons.constraint_type = 'R'
				and cons.table_name = _at_param1
Received on Fri Nov 09 2001 - 20:22:41 CET

Original text of this message