All 4,799 reports

MixedClaude · 17 May 2025

Even then, they'll often make subtle mistakes that you're not going to catch unless you already have good knowledge of your RDBMS

sgarland on Hacker News

In the thread “Getting AI to write good SQL”, replying to this comment

Helped: Explicitly stating the database and version to avoid invalid feature assumptions.

Got in the way: AI recommended a redundant composite index due to lack of MySQL internal knowledge.

… You have to explicitly state the DB and version, otherwise it will assume you have access to functions / features that may not exist. Even then, they'll often make subtle mistakes that you're not going to catch unless you already have good knowledge of your RDBMS. For example, at my work we're currently doing query review, and devs have created an AI recommendation script to aid in this. …