logoalt Hacker News

wvenableyesterday at 11:41 PM1 replyview on HN

It's the optimizer caching the query plan as a parameterized query. It's not re-planning the index lookup on every execution.


Replies

SigmundAyesterday at 11:47 PM

The parameter type is part of the cache identity, nvarchar and varchar would have two cache entries with possibly different plans.

show 1 reply