Pro and Cons of Parameter Sniffing

Look at the following 3 scripts:
-- 1. Hardcoded
SELECT
*
FROM
Sales.Orders
WHERE
DateAndTime < '19900101'

-- 2. Variable
DECLARE @FilterDate DATETIME = '19900101'
SELECT
*
FROM
Sales.Orders
WHERE
DateAndTime...

2012-01-02

351 reads

Blogs

Your First Jupyter Notebook

By

In April, I said I was going to start learning Jupyter Notebooks. It’s November....

Using Visual Studio Code

By

I’m a creature of habit. I have my routine when I get to my...

Docker Containers and Persistent Data

By

(Be sure to checkout the FREE SQLpassion Performance Tuning Training Plan - you get...

Read the latest Blogs

Forums

Numeric and Decimal

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Numeric and Decimal, which is...

Turn If statement into Case

By GrassHopper

How can I convert this into a Case statement so that the query is...

The Conference Springboard

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Conference Springboard

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Missing Data

See possible answers