Using SQL Server’s Parameter Embedding Optimisation

In this post I’m taking a look at the Parameter Embedding Optimisation that can be used by the SQL Server query optimiser when statement level recompilation is used.

This can be taken advantage of, for example, when implementing dynamic filtering or dynamic sorting, i.e. when user input determines which columns of a table […] “Using SQL Server’s Parameter Embedding Optimisation”