SQL SERVER – Delete Statement and Index Usage

delete statementRecently I had a very interesting conversation with my client about Comprehensive Database Performance Health Check. The client wanted to know if the index help with the DELETE command as well. The answer is yes, Indexes do help with the DELETE statement.

Let us see a simple example of the SELECT command and its execution plan. Here you will be able to see the query using the index in the execution plan.

Execution plan query tool window.

Now let us convert the same SELECT statement to the DELETE statement. Once you execute it, check the execution plan as well. Here are a few ways how you can enable the execution plan.

DELETE statement

You will see in the execution plan there is a use of indexes. I guess that’s it today. A very short blog post.

Here are a few associated blog posts which you may find interesting.

Please do not forget to subscribe to my youtube channel. Let me know if you have any other SSMS tip which you think help the larger community.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

SQL Delete, SQL Index, SQL Scripts, SQL Server
Previous Post
SQL SERVER – Not Auto-Updating Statistics with STATISTICS_NORECOMPUTE
Next Post
SQL SERVER – Performance Comparison – BETWEEN, IN and Operators

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.