I have following queries:
DELETE FROM [Entry]
WHERE CompanyId = 1
AND EmployeeId IN (3, 4, 6, 7, 14, 17, 20, 21, 22,....100 more)
AND Entry_Date = '2016-12-01'
AND Entry_Method = 'I'
DELETE FROM [WrongEntry]
WHERE CompanyId = 1
AND EmployeeId IN (4, 7, 14, 17, 20, 21, 22, 24....100 more)
AND Entry_Date = '2016-12-01'
AND Entry_Method = 'I'
DELETE FROM [Entry]
WHERE CompanyId = 1
AND EmployeeId IN (1, 4, 6, 7, 14, 17, 20, 21, 22,....100 more)
AND Entry_Date = '2016-12-02'
AND Entry_Method = 'I'
DELETE FROM [WrongEntry]
WHERE CompanyId = 1
AND EmployeeId IN (5, 7, 14, 17, 20, 21, 22, 24....100 more)
AND Entry_Date = '2016-12-02'
AND Entry_Method = 'I'
Like this I have for complete month from date 01-Dec-2016 to 31-Dec-2016.
When I run these queries, it takes a lot of time & also while executing these queries, the table gets locked for the time until the execution is complete.
What is the best way to bulk delete in the above scenario? Is there any other way? How can I bulk delete these queries quickly?
Note: EmployeeId
are always different at all the time