DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Is any problem if table has more triggers

  1. #1
    Join Date
    Aug 2001
    Posts
    15

    Question Is any problem if table has more triggers

    Hi All,

    Is any difficulty get occurred if a table has
    more triggers (5 or so).

    Thanks.
    Thanks,

    Nilopher.

  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    It depends on what the triggers do. If it takes long to process the trigger code the performance of the triggering event (insert, update, delete) and the overall performance of the database may degrade. Otherwise I don't see any problem.

    HTH
    Last edited by SANJAY_G; 01-03-2003 at 04:58 AM.
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  3. #3
    Join Date
    Aug 2001
    Posts
    15
    All the trigger codes contains a simple logic like
    selecting some values updating the values in all
    events (inserting, updating, deleting).

    Thanks Sanjay.
    Thanks,

    Nilopher.

  4. #4
    Join Date
    Dec 2002
    Location
    India & Australia
    Posts
    68

    Is any problem if table has more triggers

    The Triggers which is at back end will only fire on its event occuring. However, It weighs the database from its space allocation and subsequently overhead problems occur when properly not utilised.
    Such as
    Application overload;
    If it is recursive then creates other triggers to fire on its invocation;
    Back-End consumation;
    DML operations in particular causes mutating the table.

    VAST

  5. #5
    Join Date
    Jan 2002
    Location
    India
    Posts
    105
    Total time would be proportional to the sum of time taken by individual statments.

    When you say u r updating table u may update large table that can time.

    Various other factors can also cause delay in executing all triggers.

    Can you minimize your buisness logic ? May be some part of it you can code in Application itself.


    Regards
    viraj
    --------
    9i OCA
    A Wise Man Knows How much he doesn't know !!!

  6. #6
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Originally posted by virajvk

    Can you minimize your buisness logic ? May be some part of it you can code in Application itself.
    This is not advisable. Performing database related stuff are always better on backend than coding it in application.

    Sameer

  7. #7
    Join Date
    Dec 2002
    Location
    India & Australia
    Posts
    68

    Is any problem if table has more triggers

    Originally posted by Sameer
    This is not advisable. Performing database related stuff are always better on backend than coding it in application.

    Sameer
    I fully agree with SAMEER as it coincides with the concept of minimizing the code length and application build length. The Beauty of triggers is it only fires on the event occuring.

    Anyhow Business logic cannot be minimized, since client is the best end-user for which all these applications were framed.

    Good discussion ..........Keep it up ALL.

    VAST

  8. #8
    Join Date
    Jan 2002
    Location
    India
    Posts
    105
    I agree Buisnes Logic coming from client can not be minimize but DBA can always think of Optimzing the operations by considering varous options
    E.g. You can use more Materialized Views.

    Analyzing true & optimized requirement of triggers is my stragey of working.

    Regards

    Viraj
    ********
    9i OCA
    A Wise Man Knows How much he doesn't know !!!

  9. #9
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    As far as I remember there is one limitation about triggers (even in 9i):

    The Trigger Cascade Limit is 32.
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

  10. #10
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Definitely triggers on table are performance bottleneck. Try to avoid them.
    The same business logics (functions) can be achieved in procedures and views.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width