3 ms·
Is there a way to bypass SQL completely, and somehow give the Postgres the plan to execute? So targeting their intermediate language (i presume, it is not stabl
by dgan 3y ago
Is there a way to bypass SQL completely, and somehow give the Postgres the plan to execute? So targeting their intermediate language (i presume, it is not stable?) instead of the front one
- SigmundA 3y agoMSSQL lets you save a query plan as XML then upload to another system as a hint. PG could do this using the json or xml output of EXPLAIN.
- justinclift 3y agoThat's an interesting idea. Might be a good ability for someone to add. :)
- alex-korr 3y agoOracle had it for decades - ie outlines.
- U1F984 3y agoNot sure why this is down voted, I also looked into this at some point but was unable to find a solution.
- __s 3y agoYou could do it as an extension, but otherwise no
- ioltas 3y agoThere are hooks for the planner and the executor, so you could force their hand quite easily with a plan extracted from a previous EXPLAIN. Being able to pass a plan at protocol level would be more efficient, for sure. I’ve worked on Postgres-XC and somewhat Postgres-XL, and that’s something that we wanted to do to generate a plan on one node, and push down the compiled plan down to other nodes to avoid the overhead of the plan computation. This stuff did that for snapshots and a few more things with an extension of the protocol.