Re: Add ALL_CANDIDATES option to EXPLAIN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add ALL_CANDIDATES option to EXPLAIN
Date
Msg-id 1743894.1722014034@sss.pgh.pa.us
Whole thread Raw
In response to Add ALL_CANDIDATES option to EXPLAIN  (Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>)
List pgsql-hackers
Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com> writes:
> I have a prototype for an ALL_CANDIDATES option for EXPLAIN. The goal
> of this option is to print all plan candidates instead of only the
> cheapest plan. It will output the plans from the most expensive at the
> top to the cheapest.

This doesn't seem feasible at all to me.  If we don't prune plans
fairly aggressively at lower plan levels, we'll have a combinatorial
explosion in the amount of work the planner has to do.  Have you
tried this on even slightly complex plans --- say, a dozen-way join?
I do not think you'll like the runtime, the amount of memory consumed,
or the verboseness of the output.  (I wonder how it interacts with
GEQO, too.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Anthonin Bonnefoy
Date:
Subject: Add ALL_CANDIDATES option to EXPLAIN
Next
From: Robert Haas
Date:
Subject: Re: Add ALL_CANDIDATES option to EXPLAIN