SQLServer

Cardinality Estimation Limitations

As you might know, SQL Server uses internally Statistics to estimate how many rows are returned from a specific query. That process is called the Cardinality Estimation. Based on the output from the Cardinality Estimation the Query Optimizer generates an Execution Plan, which is cached and finally executed. In today’s blog posting I’m going to talk …

Cardinality Estimation Limitations + read more

Do you need more than STATISTICS IO for Query Tuning?

The session option STATISTICS IO is my friend during query tuning engagements, because it tells you exactly how many page reads you had for a specific query. Every time that SQL Server requests a page of 8KB from the Buffer Pool, it gets logged through the output of STATISTICS IO. As a general guide I …

Do you need more than STATISTICS IO for Query Tuning? + read more

Plan Caching

Today I want to talk more about Plan Caching and its side-effects in SQL Server. As you might know, every logical query submitted to SQL Server is compiled into a physical execution plan. That execution plan is afterwards cached in the so-called Plan Cache for further reuse. Let’s talk in the first step about adhoc SQL statements …

Plan Caching + read more