Re: limit number of rows using a trigger
another issue is that my log grows once a second for 30 days so I end up with around 2.7 million rows so "COUNT(*)" may end up slow.
perhaps I could just use the time stamp like this?:
SELECT MIN (last_update) INTO @min FROM a_test;
IF NEW.last_update - @min >= 30 THEN
DELETE FROM a_test ORDER BY last_update LIMIT 1;
Subject
Views
Written By
Posted
8555
March 13, 2012 03:50AM
2682
March 13, 2012 03:59AM
Re: limit number of rows using a trigger
2096
March 13, 2012 04:09AM
2732
March 13, 2012 04:11AM
2317
March 13, 2012 11:50AM
1698
March 14, 2012 05:32AM
2612
March 14, 2012 11:48AM
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.