Current location - Loan Platform Complete Network - Big data management - What is the maximum limit for a single performance delete in a SQL Server database?
What is the maximum limit for a single performance delete in a SQL Server database?
Logically there is no limit.

1. But a single statement Sql will start a hidden transaction, so before the completion of the deletion transaction, will occupy the log file space, so the actual limit is limited by the log file size limit, if the log file size is not limited, but also limited by the log file physical disk space size.

2. Even if it is not limited, a large number of deletions at a time will be system performance. So it is best to use other methods to achieve:

a. TRUNCATE TABLE <TABLE NAME>

OR

b. WHILE 1 = 1 BEGIN

DELETE <TABLE NAME> WHERE <? >

IF @@ROWCOUNT = 0 BREAK

END