| ▲ | fsmv 2 hours ago | ||||||||||||||||
But how will you know that the query plan actually does what your query asked for? | |||||||||||||||||
| ▲ | amluto 2 hours ago | parent | next [-] | ||||||||||||||||
I would like to think that pg_hint_plan is designed in such a way that any hint it accepts must be a valid plan for the query. I’m quite confident that schemes with this property that can also express high quality plans are possible and not even excessively complicated. This is not to say that it’s possible to genetically verify that a proposed algorithm does what you want it to — that would be undecidable or NP-hard or co-NP-hard depending on how you formulate the question. | |||||||||||||||||
| |||||||||||||||||
| ▲ | polyphilz 2 hours ago | parent | prev | next [-] | ||||||||||||||||
`pg_hint_plan` has a debug log so you can verify Postgres actually used the hint or not! Used this during evaluations | |||||||||||||||||
| ▲ | timcobb 2 hours ago | parent | prev | next [-] | ||||||||||||||||
I imagine you can perform operations on query plans to transform them and determine equivalence? | |||||||||||||||||
| ▲ | larodi 44 minutes ago | parent | prev | next [-] | ||||||||||||||||
you'll have to prove equivalence through some Lean4 code perhaps? or some weird clause tree comparisons... good question indeed. | |||||||||||||||||
| ▲ | quotemstr an hour ago | parent | prev | next [-] | ||||||||||||||||
Because P!=NP (very probably IMHO) there's a huge class of problem for which LLMs are useful on the expensive and heuristic-y generation side because the verification is relatively inexpensive. | |||||||||||||||||
| ▲ | KK7NIL 2 hours ago | parent | prev [-] | ||||||||||||||||
"... make no mistakes" :) | |||||||||||||||||