Microsoft SQL Server Performance-Analysis
Start SQL Server Profiler from the Management Studio:
.png)

Add a column filter, such as on the "Duration" column, to display all queries that take longer than 500 milliseconds:

Select the query from the log and copy the query text:

Click the "New query" button in the Management Studio, paste the copied query text into the new query tab and activate the "Include execution plan in output" function:

After executing (1.), another tab "Execution Plan" (2) will appear at the bottom.

In the execution plan, you can see the individual operations of the SQL server and their utilization in detail. You may also receive information about missing indices or similar. This can help you to determine why the execution is taking so long.
If your query is an update or insert, you may also see the stored trigger activities here and, in the case of a select, the stored table joins of a view.
