Re: Add ALL_CANDIDATES option to EXPLAIN

2024-07-29 Thread Ashutosh Bapat
On Fri, Jul 26, 2024 at 10:47 PM Robert Haas wrote: > > On Fri, Jul 26, 2024 at 12:59 PM Anthonin Bonnefoy > wrote: > > 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 th

Re: Add ALL_CANDIDATES option to EXPLAIN

2024-07-26 Thread Robert Haas
On Fri, Jul 26, 2024 at 1:40 PM Tom Lane wrote: > I wonder how far you'd get by just printing the surviving paths > (that is, something like Anthonin's patch, but without lobotomizing > add_path). The survivors would have to dominate the cheapest-total > path along one of the other metrics add_pa

Re: Add ALL_CANDIDATES option to EXPLAIN

2024-07-26 Thread Tom Lane
Robert Haas writes: > I've thought about trying to figure out some way of identifying and > printing out plans that are "interestingly different" from the chosen > plan, with the costs they would have had, but I haven't been able to > come up with a good algorithm. I wonder how far you'd get by j

Re: Add ALL_CANDIDATES option to EXPLAIN

2024-07-26 Thread Robert Haas
On Fri, Jul 26, 2024 at 12:59 PM Anthonin Bonnefoy wrote: > 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. Her

Re: Add ALL_CANDIDATES option to EXPLAIN

2024-07-26 Thread Tom Lane
Anthonin Bonnefoy 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

Add ALL_CANDIDATES option to EXPLAIN

2024-07-26 Thread Anthonin Bonnefoy
Hi, 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. Here's an example: explain (all_candidates) select * from pgbenc