SQL*Forms Trigger Optimization

From: james.jurista <jurista_at_cbnewsg.cb.att.com>
Date: 23 Dec 92 22:01:19 GMT
Message-ID: <1992Dec23.220119.11645_at_cbfsb.cb.att.com>


Greetings, netters:

I'm using SQL*Forms 3.0 under Oracle v6, and my question is this:

Is is more efficient to code one form-level trigger or many block-level triggers to accomplish a task. For example, I have triggers with the following structure:

(Form level KEY-DOWN)

	declare
		valid boolean := TRUE;
	begin
		if :system.cursor_block = 'block1' then
			procedure1(valid);
		elsif :system.cursor_block = 'block2' then
			procedure2(valid);
		elsif :system.cursor_block = 'block3' then
			procedure3(valid);
		else
			valid := FALSE;
		end if;
		if (valid = TRUE) then
			down;
		end if;
	end;


(Block level KEY-DOWN (one for each of blocks 1, 2, and 3))
declare valid boolean := TRUE; begin procedureX(valid); if (valid = TRUE) then down; end if; end;

I believe that it's good practice to define each trigger as close as possible to its point of use (in this case, at the block level), but this can greatly increase the size of the INP file and thus, I assume, the memory requirements since a larger program must be loaded at run time. From that perspective it would seem that the form-level approach is more prudent.

It comes down to this: which is more efficient? And, while we're at it, which style do you prefer.

Please e-mail responses, I will post a summary. Thanks in advance for any assistance!

Jim

-=-=-=-=-=- Jim Jurista =-=-=-= Internet: jurista_at_llssak.attmail.com =-=-=-=-

                  "Musical elation is my only consolation..."
           Views/opinions above:  Mine, not AT&T's nor probably yours
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Received on Wed Dec 23 1992 - 23:01:19 CET

Original text of this message