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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Low batch Batchrequests/sec

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.
Go to Top of Page

dolphin123
Yak Posting Veteran

84 Posts

Posted - 2014-08-29 : 16:32:06
Thanks :)
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2014-08-30 : 02:16:02
Also read through the data load performance guide - http://www.sqlserver-dba.com/2011/11/data-loading-performance-guide.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -