|Subject||Delete causes server to hang|
On my website i have a tabel where i log some web requests - about 90.000/hour.
Every hour this SQL is executed in a stored procedure:
delete from requests where created < dateadd(-7 day to current_timestamp);
This results in about 90.000 deleted rows.
However, after the statement has started, i see the number of attachents/statements spike at 150-200 attachments for about 20-30 seconds. This results in connection pool full exceptions on the web server, and it looks like the database server is not executing other statements for that small period of time.
Please note that the writing of the row in the web request tabel, is done by a background thread.
Best regards Thomas Krag-Pedersen