<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ai-made-the-server-cook-thanksgiving-twice-lh04bussr" -->

---
title: AI Made the Server Cook Thanksgiving Twice | daily.dev
description: Reusing cached query plans is right almost all of the time, but the blanket fix for parameter sniffing can hurt more than the problem. A plan built for a...
canonical: https://daily.dev/posts/ai-made-the-server-cook-thanksgiving-twice-lh04bussr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: AI Made the Server Cook Thanksgiving Twice | daily.dev
og:description: Reusing cached query plans is right almost all of the time, but the blanket fix for parameter sniffing can hurt more than the problem. A plan built for a...
og:url: https://daily.dev/posts/ai-made-the-server-cook-thanksgiving-twice-lh04bussr
og:image: https://api.daily.dev/og/posts/Lh04busSr.png
og:image:alt: AI Made the Server Cook Thanksgiving Twice
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Made the Server Cook Thanksgiving Twice

**[SQL Authority](https://daily.dev/sources/sql-authority)** · 2 min read · 0 upvotes · 0 comments

## Summary

Reusing cached query plans is right almost all of the time, but the blanket fix for parameter sniffing can hurt more than the problem. A plan built for a customer with four orders gets reused for one with four hundred thousand, and the same query behaves very differently. Recompiling the plan on every call stops that, but nothing is cached and the processor climbs. The narrower fix is to recompile only the one procedure that suffers, or give the odd customer its own path.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.sqlauthority.com/2026/11/28/ai-made-the-server-cook-thanksgiving-twice>

## Questions this post answers

### Why does recompiling every query plan on every execution hurt SQL Server performance?

Forcing the database to recompute the plan on every execution means nothing is cached, so the processor climbs because every call pays the full cost of choosing an approach. That cost can exceed the cost of running the query itself, so the fix becomes the problem. The narrower approach is to recompile only the one procedure that suffers.

_Developers tuning slow queries track fixes like this on daily.dev._

### What is parameter sniffing and why does one cached plan cause wildly different performance?

Parameter sniffing happens when a plan built for one parameter value is reused for very different ones. A plan worked out for a customer with four orders gets reused for a customer with four hundred thousand, and the approach that suits a small result falls apart at that size. Same query and same plan give wildly different results.

_Anyone chasing 'it was fine yesterday' database reports will find more like this on daily.dev._

## Similar posts on daily.dev

- [AI Execution Plan Analysis: I Gave It My Plan and Asked What Was Wrong](https://daily.dev/posts/ai-execution-plan-analysis-i-gave-it-my-plan-and-asked-what-was-wrong-goqe4azrt) · SQL Authority · 0 upvotes · 0 comments
- [The Query Optimizer Interview: Twenty Minutes, No Hints](https://daily.dev/posts/the-query-optimizer-interview-twenty-minutes-no-hints-ownvu4mdx) · SQL Authority · 1 upvotes · 0 comments
- [The Sixth Execution](https://daily.dev/posts/the-sixth-execution-a6umibut5) · Planet PostgreSQL · 10 upvotes · 5 comments
- [Snowflake Performance Tips and Tricks — Part 5](https://daily.dev/posts/snowflake-performance-tips-and-tricks-part-5-mounpgvlh) · Snowflake Community · 0 upvotes · 0 comments
- [How SingleStore Learns: Feedback Reoptimization Explained](https://daily.dev/posts/how-singlestore-learns-feedback-reoptimization-explained-lmnjzs75p) · SingleStore · 0 upvotes · 0 comments

---

Tags: [#backend](https://daily.dev/tags/backend), [#microsoft-sql-server](https://daily.dev/tags/microsoft-sql-server)

[View this post on daily.dev](https://daily.dev/posts/ai-made-the-server-cook-thanksgiving-twice-lh04bussr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"AI Made the Server Cook Thanksgiving Twice","url":"https://daily.dev/posts/ai-made-the-server-cook-thanksgiving-twice-lh04bussr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ai-made-the-server-cook-thanksgiving-twice-lh04bussr"},"datePublished":"2026-11-30T12:56:12.607Z","dateModified":"2026-11-30T12:56:33.864Z","description":"Reusing cached query plans is right almost all of the time, but the blanket fix for parameter sniffing can hurt more than the problem. A plan built for a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/463ab6b9bdc08d15dc5e690ff638cc35?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/463ab6b9bdc08d15dc5e690ff638cc35?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"SQL Authority","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"SQL Authority","logo":"https://media.daily.dev/image/upload/s--reCGnvgi--/f_auto,q_auto/v1780213436/logos/sql-authority?_a=BAMAMiWQ0","url":"https://daily.dev/sources/sql-authority"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ai-made-the-server-cook-thanksgiving-twice-lh04bussr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"backend,microsoft-sql-server","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"SQL Authority","item":"https://daily.dev/sources/sql-authority"},{"@type":"ListItem","position":3,"name":"AI Made the Server Cook Thanksgiving Twice"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/ai-made-the-server-cook-thanksgiving-twice-lh04bussr#faq","mainEntity":[{"@type":"Question","name":"Why does recompiling every query plan on every execution hurt SQL Server performance?","acceptedAnswer":{"@type":"Answer","text":"Forcing the database to recompute the plan on every execution means nothing is cached, so the processor climbs because every call pays the full cost of choosing an approach. That cost can exceed the cost of running the query itself, so the fix becomes the problem. The narrower approach is to recompile only the one procedure that suffers. Developers tuning slow queries track fixes like this on daily.dev."}},{"@type":"Question","name":"What is parameter sniffing and why does one cached plan cause wildly different performance?","acceptedAnswer":{"@type":"Answer","text":"Parameter sniffing happens when a plan built for one parameter value is reused for very different ones. A plan worked out for a customer with four orders gets reused for a customer with four hundred thousand, and the approach that suits a small result falls apart at that size. Same query and same plan give wildly different results. Anyone chasing 'it was fine yesterday' database reports will find more like this on daily.dev."}}]}
```

