logoalt Hacker News

revaltoday at 12:23 AM1 replyview on HN

I’ve seen this happen to SQL Server many times. Every time the solution is a stored proc with the recompile option enabled.


Replies

simondotautoday at 3:18 AM

The answer to every problem is to rebuild statistics. (And never use stored procedures. It's just a shitty API layer in the worst language imaginable, sitting outside of source control. If you need an API layer, write it in a real language, ideally the one you're already using.)