Re: Checking field values in on-validate trigger with SQL cursors

From: John Blackburn <jb2_at_qdot.qld.gov.au>
Date: 30 Nov 1994 00:33:12 GMT
Message-ID: <3bgh88$s2_at_camelot.qdot.qld.gov.au>


extdrv_at_rcum wrote:

> My problem is cheking field values in on-validate-triiger or
> post-change
> trigger in V3 forms.
 

> I use following two methods for chekincg of existing values in some table:
 

> 1.
> [Implicit Cursor Example]
 

> 2.
> [Explicit Cursor Example]
 

> Which method is better in context of performance( parsing and executing )?
> Pleayour experience...

The second method is usually considered the better performer because when implicit cursors are used, (i.e. the first method) the fetch is always performed twice. The second time to check if there are too many rows.

So, if you don't care if more than one row is returned, or you can guarantee that only one row is ever returned, the second method is definantly better.

--
 
John Blackburn                                          Phone: +61 7 2534634
jb2_at_qdot.qld.gov.au                                     Fax:   +61 7 8541194
Received on Wed Nov 30 1994 - 01:33:12 CET

Original text of this message