News for hackers. Stuff that matters.
Re:Pg_hint_plan: Force PostgreSQL to execute query plans the... by dgan on Saturday March 16, 2024 @07:18AM (#39724888)
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
Re:Pg_hint_plan: Force PostgreSQL to execute query plans the... by U1F984 on Saturday March 16, 2024 @08:19AM (#39725272)
Not sure why this is down voted, I also looked into this at some point but was unable to find a solution.
Re:Pg_hint_plan: Force PostgreSQL to execute query plans the... by SigmundA on Saturday March 16, 2024 @08:11AM (#39725202)
MSSQL 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.
Re:Pg_hint_plan: Force PostgreSQL to execute query plans the... by justinclift on Saturday March 16, 2024 @10:44AM (#39726387)
That's an interesting idea. Might be a good ability for someone to add. :)
Re:Pg_hint_plan: Force PostgreSQL to execute query plans the... by alex-korr on Saturday March 16, 2024 @11:23PM (#39731658)
Oracle had it for decades - ie outlines.
Re:Pg_hint_plan: Force PostgreSQL to execute query plans the... by __s on Saturday March 16, 2024 @10:55AM (#39726473)
You could do it as an extension, but otherwise no
Re:Pg_hint_plan: Force PostgreSQL to execute query plans the... by ioltas on Saturday March 16, 2024 @08:32PM (#39730739)
There 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.