Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dolphin123
Yak Posting Veteran
84 Posts |
Posted - 2014-08-29 : 16:04:55
|
Hi,I am running this query to do massive deletion in my database. I am looking at Batchrequests/sec and it is quite low (like 15% of what my server can handle) Is there any way to rewrite this query to do more batchrequest/sec?delete from Position Where MainFirmID = 26 and BatchID in ( select BatchId from MyDB..Batch Where FirmId = 26 and PeriodId <= 110 and PeriodId > 90)Thanks for your help. - D |
|
bitsmed
Aged Yak Warrior
545 Posts |
Posted - 2014-08-29 : 16:29:07
|
Here's an interesting article: [url]http://social.technet.microsoft.com/wiki/contents/articles/20651.sql-server-delete-a-huge-amount-of-data-from-a-table.aspx[/url]Read the conclusion and adapt the last sql secion to match your needs. |
|
|
dolphin123
Yak Posting Veteran
84 Posts |
Posted - 2014-08-29 : 16:32:06
|
Thanks :) |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
|
|
|
|