Re: limit number of rows using a trigger
Darren White Wrote:
-------------------------------------------------------
> ah ok thanks. Do you have a suggestion of a way
> around that then?
Create a procedure that will insert log records into the table,
hide the table from clients using proper grants- don't allow them to directly insert or update this table,
allow them only to call the procedure when they want to store log records in the table.
Code your requirements inside the procedure (if count > 100 delete old records, and insert a new record etc.).
I'am not sure if counting and deleting records on each insert would be very efficient from performance point of view,
in multiuser environment this could lead to contention and scalability issues,
maybe the better option would be to create and event that would be scheduled once per day (or better - at night) and clear unwanted records from the table.
Subject
Views
Written By
Posted
8320
March 13, 2012 03:50AM
2612
March 13, 2012 03:59AM
2039
March 13, 2012 04:09AM
2655
March 13, 2012 04:11AM
2257
March 13, 2012 11:50AM
1640
March 14, 2012 05:32AM
Re: limit number of rows using a trigger
2546
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.