Skip to content

Conversation

LaurentiuMa
Copy link

@LaurentiuMa LaurentiuMa commented Mar 14, 2025

Improves cases in which DELETE is used to remove all of the rows in a table and replaces it with TRUNCATE which improves performance as it does not scan each row individually before deletion. This also resets the identity column where applicable.

In the case where the DELETE statement outputs to a temporary table, the insert takes place before truncation.

Going forward, this would mean that a user executing this would require at least the ALTER permission rather than DELETE.

@LaurentiuMa LaurentiuMa requested a review from a team as a code owner March 14, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant