In an earlier article we saw how we create an Extended Event to see queries with a long duration. In this article we will create an Extended Event that records blockings. All we need to do is create it… read more
How do we find how much more it takes to complete the query and which is delayed (SQL Server Query Profiling)
Many times we will encounter queries that take too long to complete or never complete at all. To find what exactly is at fault the most useful information is the actual execution plan. As the actual execution plan requires the completion of the query, with… read more
How to force a plan in SQL Server and why not
Sometimes, depending on the value we have given to a parameter, a query may run with a different plan (execution plan) and have a different duration. This phenomenon is called parameter sniffing. This may be due to… read more
How do we collect long-running queries via Extended Event and how do we read its data
Many times we will need to find how many and which SQL queries were executed for a long time in a period of time in SQL Server. The easiest solution with the least performance impact is to create an Extended Event. The… read more
