‹ BackHN Continuity

Thread

Training a 4B model to produce 81% faster query plans than Postgres

702 points · 144 comments · polyphilz

  1. fsmv · · focus · HN ↗
    But how will you know that the query plan actually does what your query asked for?
    1. topaz0 · · focus · HN ↗
      You're misunderstanding the setup here. The LLM doesn't modify the query, just some details about how to choose between different ways to break the query into basic operations on the tables. The SQL doesn't change. It's still up to postgres to guarantee that the results match the query. If the proposed plan were nonsense that didn't amount to carrying out the query, postgres would ignore it.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.