SQLpassion BLOG

The pain of Forced Parameterization in SQL Server

A few months ago I blogged about the challenges of Simple Parameterization in SQL Server. Today I want to continue this discussion by talking about Forced Parameterization in SQL Server. Forced Parameterization Simple Parameterization has a number of limitations in SQL Server. It will not happen if your SQL statements contain any of these: JOIN …

The pain of Forced Parameterization in SQL Server + read more

How to pollute your Plan Cache with parameterized SQL statements

Parameterization of your SQL statements is always a good idea. With parameterized SQL statements you are not able to pollute your Plan Cache – WRONG!!! In this blog posting I want to show you how easy it is to pollute your Plan Cache even with parameterized SQL statements. ADO.NET – AddWithValue ADO.NET is the part …

How to pollute your Plan Cache with parameterized SQL statements + read more

How “Optimize for Adhoc Workload” impacts your Plan Cache

Today I want to talk about the server option Optimize for Adhoc Workload and how it affects your Plan Cache in SQL Server. Before we dig into the details, I want to show you how SQL Server can reuse cached execution plans. Execution Plan Reuse Every time that you submit a query to SQL Server, …

How “Optimize for Adhoc Workload” impacts your Plan Cache + read more