oci8 and primary key & its speed
| From: | almir | Date: | Mon, 26 Mar 2001 16:53:22 +0000 |
| Subject: | oci8 and primary key & its speed | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-45623@lists.php.net to get a copy of this message | ||
first of all thank all of you who helpd me up to now, to make this work
now when i make
SELECT c.column_name, c.position
FROM user_cons_columns, c, user_constraints t
WHERE t.table_name='YOURTABLENAME'
AND t.constraint_type='P'
AND t.constraint_name=c.constraint_name
AND t.table_name=c.table_name
ORDER BY c.position
it is ok and i have it
but what i realy need to know is the name of trigger that was fired , so i
made this but this one needs minutes
why ??
SELECT c.column_name, c.position, tc.trigger_name
FROM user_cons_columns c, user_constraints t, all_trigger_cols tc
WHERE t.table_name='TR_LOG'
AND t.constraint_name=c.constraint_name
AND t.table_name=c.table_name
and tc.column_name=c.column_name
and tc.table_name=t.table_name
ORDER BY c.position;
now i make one query to find out the name of column , then another one to
get the name of trigger( this is fast) but i would like to write a single
statement to get the name of trigger because that is the only thing i need
actualy
but it is to slow