Users Pricing

forum

Home Forums Dapper query slows down after the first few requests — parameter sniffing? – MindStick

Dapper query slows down after the first few requests — parameter sniffing?

Lily Chitlangiya 92 30 Sep 2026

We're seeing a strange pattern in production: the first call to a Dapper-backed endpoint is instant, but the next few within the same minute crawl. SQL Server 2019, same query plan every time according to the actual execution plan.

I enabled SET STATISTICS IO, TIME ON and logical reads jump after the initial execution. Could parameter sniffing be locking the optimizer onto a bad plan from the first parameter set? We don't use OPTION (RECOMPILE). Is there a lightweight way to diagnose or mitigate this without rewriting the whole data layer?


0 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md