Let’s talk when you are looking at double digit TB at a minimum.
Training a 4B model to produce 81% faster query plans than Postgres
91–100 of 124 posts
Re: Training a 4B model to produce 81% faster query plans than Postgres
#92Re: Training a 4B model to produce 81% faster query plans than Postgres
#93TL:DR; for people. Index your data properly.
(Indexes would be nice though)
Re: Training a 4B model to produce 81% faster query plans than Postgres
#94Re: Training a 4B model to produce 81% faster query plans than Postgres
#95Re: Training a 4B model to produce 81% faster query plans than Postgres
#96Re: Training a 4B model to produce 81% faster query plans than Postgres
#97Re: Training a 4B model to produce 81% faster query plans than Postgres
#98“81% faster query plans than Postgres”…on an 8 GB dataset that fits entirely in memory, with shared_buffers constrained to a fraction of that, queries warmed before measuring, and read-only SELECTs. I would be cautious about over fitting, it’s tough to say if those query plans would really be more optimal than Postgres heuristics at scale and with a bit more realistic OLTP workloads. In any case, such is life with pr…
With a 4B parameter model that probably ran through 8GBs of RAM multiple times to run. At a certain point we should seriously talk about CUDA accelerating Postgres instead.
Re: Training a 4B model to produce 81% faster query plans than Postgres
#99Earlier quoted context omitted.
The immediate problem: How do you know which one is better without running them?
Could you A/B at random, use that to collect data and eventually feed that back in to prefer A or B depending on the shape of the query?
Re: Training a 4B model to produce 81% faster query plans than Postgres
#100Engineer: "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?"
I’ve seen this happen to SQL Server many times. Every time the solution is a stored proc with the recompile option enabled.