Hi all,
Wonder if anyone can suggest an answer to my problem.
Currently got a huge Session table in Sql Server 2005, I need to perform some kind of maintenance job periodically to start reducing the amount of rows. However I need to leave the system fully functional and avoid any table locks, e.g delete from Session where date < today
I have thought of a job that copies the table to a temp table, does the processing and identifies the top 100 rows which it can delete by the primary key thus avoiding a table lock.
Is there a better way? Will table partitioning help?
Cheers in advance
Wonder if anyone can suggest an answer to my problem.
Currently got a huge Session table in Sql Server 2005, I need to perform some kind of maintenance job periodically to start reducing the amount of rows. However I need to leave the system fully functional and avoid any table locks, e.g delete from Session where date < today
I have thought of a job that copies the table to a temp table, does the processing and identifies the top 100 rows which it can delete by the primary key thus avoiding a table lock.
Is there a better way? Will table partitioning help?
Cheers in advance


Comment