sending changed Values for a table as Mail- any easy way

  • Hi All,

    I have a table in which 200 columns are there . they are updated in the application. Once the updation is done only changed column values have to sent as mail to the intended recipeint. How will we achieve this.

    I have tried this with trigger, it is consuming more time (4 sec.)

     

    Need help

     

  • This was removed by the editor as SPAM

  • Does the 4 seconds for the trigger also include sending the mail from within the trigger?

    If that is the case, you may save some time by not sending mail from inside the trigger (this is not recommended anyway), but instead store the changed values into a separate table.

    This separate table can then be scanned by an independent job at some appropriate interval, and if any material for a mail is found, that process kan do the actual mailing.

    /Kenneth

  • Thanks a lot Mr. Kenneth,

    I am not sending mail in trigger . As you said, I am storing the changed column values into sepearate table. The trigger execution for column by column checking and storing the changed info itself is taking that much time.

     

    ----Any other fast way ?

     

     

     

  • You could perhaps just store the old/new pair of rows from the deleted/inserted tables also into a separate table, and use the triggercode for evaluating what has changed in the later 'find what to mail' process.

    That way the remaining work for the trigger would be to just log audit data, the rest of the cumbersome code could be done out of scope for the immediate transaction, and let the trigger complete faster.

    Would that be an option for you?

    /Kenneth

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply