Skip to main content
8 events
when toggle format what by license comment
Apr 21, 2021 at 14:17 comment added D-K @MidhunCN did you ever learn more about this issue? I too have run into this issue and spent considerable time exploring it. Ping back if you can.
May 30, 2017 at 12:56 answer added Daniel Hutmacher timeline score: 1
May 30, 2017 at 12:32 comment added Dan Guzman @MidhunCN, if you are testing via SSMS execute your test cases using a parameterized query via sp_executesql. Although variables may look the same syntactically, they are different beasts.
May 30, 2017 at 12:24 comment added Midhun C N Yes, I'm passing input through a single variable, and I used the same one for with\Without the recompile query hint after clearing the cache.
May 30, 2017 at 12:23 comment added sepupic You did not show us any plan or even the query so we should guess.. My first thought is maybe you use local variables. When you use recompile option, the variable is sniffed, and without it the plan is building for unknown, so it's not the matter of just caching or not the plan, it's the matter of knowing the variable value as it was a constant
May 30, 2017 at 12:21 comment added Erik Reasonable Rates Darling Are you using variables?
May 30, 2017 at 12:16 comment added Scott Hodgin - Retired I'd first recommend running UPDATE STATISTICS against the tables in the query and then running both versions again - this post seems familiar to your problem - stackoverflow.com/questions/20864934/…
May 30, 2017 at 12:04 history asked Midhun C N CC BY-SA 3.0