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


Subject
Views
Written By
Posted
log table as rotating buffer
2089
February 24, 2012 07:34AM
971
February 24, 2012 09:50AM


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.