Apr 152023
 

© Laurenz Albe 2023
A while ago, I wrote about how difficult it is to get an execution plan for a parameterized query. The method suggested in that article works, but is still somewhat complicated. So I wrote a patch to support an EXPLAIN option GENERIC_PLAN, which provides native support for that. My patch got committed by Tom Lane in 3c05284d83, which means the new option will be available from v16 on. This article describes how the new feature works and how it can be useful.
The syntax of EXPLAIN (GENERIC_PLAN)
You can only use the new option in a parenthesized options list, like this:

EXPLAIN (GENERIC_PLAN) SELECT …;

Many people are still used to the old, simple way of writing…

External feed Read More at the Source: https://postgr.es/p/5Jf

 2023-04-15

Sorry, the comment form is closed at this time.