MySQL Forums
Forum List  »  Triggers

Re: After Insert generate Error
Posted by: Bob Field
Date: June 30, 2006 12:26PM

You'll probably do better set this up as a SQL script run from a cron job. As I see it, every time a row is inserted, you query another table for the retention period and delete everything older. This adds a whole lot of overhead especially if this table is inserted into frequently. This sounds to me more the task of a daily maintenance procedure. Is the log_date field a DATE, DATETIME or a TIMESTAMP field. If it's only a DATE field this trigger really would perform useful work only once each day anyway.

Options: ReplyQuote


Subject
Views
Written By
Posted
5527
June 28, 2006 11:16PM
2051
June 29, 2006 02:59PM
2058
June 30, 2006 01:19AM
Re: After Insert generate Error
2217
June 30, 2006 12:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.