Link to home
Start Free TrialLog in
Avatar of dennisjameshoward
dennisjameshoward

asked on

Table is growing too big

I have a table that receives data every second.  What I need to do is limit the size of the table so it stops growing ( I cannot change the time for input ). We do not need to keep this many records and I have decided on the time frame to keep. What I would like to do is create a trigger that after INSERT, DELETES the oldest row, I assume this will keep the table at the size I want. Any suggestions for code? Will the INSERT and DELETE trigger slow down the DB because its every second? Or is there another way to accomplish this with as little impact as possible. I just need a starting point!
Avatar of chapmandew
chapmandew
Flag of United States of America image

A good way to do this is to use partitioning in 2005 to easily swap out old records...
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial