home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!rutgers!att-out!cbfsb!cbnewsg.cb.att.com!jurista
- From: jurista@cbnewsg.cb.att.com (james.jurista)
- Newsgroups: comp.databases.oracle
- Subject: SQL*Forms Trigger Optimization
- Summary: Form- or block-level?
- Keywords: efficiency triggers SQL*Forms
- Message-ID: <1992Dec23.220119.11645@cbfsb.cb.att.com>
- Date: 23 Dec 92 22:01:19 GMT
- Sender: news@cbfsb.cb.att.com
- Organization: AT&T
- Lines: 56
-
- 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@llssak.attmail.com =-=-=-=-
- "Musical elation is my only consolation..."
- Views/opinions above: Mine, not AT&T's nor probably yours
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-