home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / oracle / 2629 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  2.1 KB

  1. 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
  2. From: jurista@cbnewsg.cb.att.com (james.jurista)
  3. Newsgroups: comp.databases.oracle
  4. Subject: SQL*Forms Trigger Optimization
  5. Summary: Form- or block-level?
  6. Keywords: efficiency triggers SQL*Forms
  7. Message-ID: <1992Dec23.220119.11645@cbfsb.cb.att.com>
  8. Date: 23 Dec 92 22:01:19 GMT
  9. Sender: news@cbfsb.cb.att.com
  10. Organization: AT&T
  11. Lines: 56
  12.  
  13. Greetings, netters:
  14.  
  15. I'm using SQL*Forms 3.0 under Oracle v6, and my question is this:
  16.  
  17. Is is more efficient to code one form-level trigger or many block-level
  18. triggers to accomplish a task.  For example, I have triggers with the
  19. following structure:
  20.  
  21.     (Form level KEY-DOWN)
  22.     declare
  23.         valid boolean := TRUE;
  24.     begin
  25.         if :system.cursor_block = 'block1' then
  26.             procedure1(valid);
  27.         elsif :system.cursor_block = 'block2' then
  28.             procedure2(valid);
  29.         elsif :system.cursor_block = 'block3' then
  30.             procedure3(valid);
  31.         else
  32.             valid := FALSE;
  33.         end if;
  34.         if (valid = TRUE) then
  35.             down;
  36.         end if;
  37.     end;
  38.  
  39.     (Block level KEY-DOWN (one for each of blocks 1, 2, and 3))
  40.     declare
  41.         valid boolean := TRUE;
  42.     begin
  43.         procedureX(valid);
  44.         if (valid = TRUE) then
  45.             down;
  46.         end if;
  47.     end;
  48.  
  49.  
  50. I believe that it's good practice to define each trigger as close as
  51. possible to its point of use (in this case, at the block level), but
  52. this can greatly increase the size of the INP file and thus, I assume,
  53. the memory requirements since a larger program must be loaded at run
  54. time.  From that perspective it would seem that the form-level approach
  55. is more prudent.  
  56.  
  57. It comes down to this:  which is more efficient?  And, while we're at
  58. it, which style do you prefer.
  59.  
  60. Please e-mail responses, I will post a summary.  Thanks in advance for
  61. any assistance!
  62.  
  63. Jim
  64.  
  65. -=-=-=-=-=- Jim Jurista =-=-=-= Internet: jurista@llssak.attmail.com =-=-=-=-
  66.                   "Musical elation is my only consolation..."
  67.            Views/opinions above:  Mine, not AT&T's nor probably yours
  68. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  69.