Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Do triggers cause a context switch between SQL & PL/SQL
Your query with the exists would be the same as doing this, right?
select count(*)
into numrows
from from ApplicationFormCriteria
where ApplicationFormCriteria.applicationFormId = :old.applicationFormId
and rownum = 1 ;
-----Original Message-----
Sent: mardi, 1. avril 2003 13:04
To: Multiple recipients of list ORACLE-L
A context switch is order because a trigger is a pl/sql object ...
if you can change the trigger ... instead of count(*) try using exists
assuming you have a usable index ...
select count(*)
into numrows
from dual
where exists ( select 1
from ApplicationFormCriteria where ApplicationFormCriteria.applicationFormId =:old.applicationFormId);
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jacques Kilchoer
INET: Jacques.Kilchoer_at_quest.com
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Apr 01 2003 - 18:08:40 CST