MySQL Forums
Forum List  »  Triggers

log table as rotating buffer
Posted by: Darren White
Date: February 24, 2012 07:34AM

ok now that my trigger is working I have a set of log tables which grow over time.

I want to limit logging to 30 days or to a certain number of rows. Basically making the log_table a rotating history buffer. Could a trigger be used to do something like the following:

Max number of rows = 2000000;
IF number of rows = 1999999;
DELETE oldest row;
INSERT new row;

Options: ReplyQuote

Written By
log table as rotating buffer
February 24, 2012 07:34AM
February 24, 2012 09:50AM

Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.