logoalt Hacker News

2001zhaozhaoyesterday at 10:16 PM5 repliesview on HN

Engineer: "HELP, our production DB is frozen on this query that worked fine before!"

Infra: "Hmm, let's check... Well would you look at that, it seems like your LLM query planner usually works and produces fast queries, but this time when you changed a variable name to trigger query rebuild, it happened to hallucinate and miss an index, would you mind re-running the LLM a few times until you get a faster query?"


Replies

malisperyesterday at 10:54 PM

Funnily enough, you could replace "LLM query planner" with just "query planner" and this comment would still hold true

show 2 replies
ehe78qhetoday at 6:23 AM

This exact situation has happened to me with Postgres' stock query planner when an automatic analyze got a bad sample of a large table.

revaltoday at 12:23 AM

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

show 1 reply
galkkyesterday at 11:28 PM

Our database 12.34 was working great, but 12.35 deployment had some optimizer changes that had regression on exact scenario that you have in your statistics. Shit happens, sorry. Use this hint.