Re: feature request: explain "with details" option

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Roger Pack <rogerdpack2(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: feature request: explain "with details" option
Date: 2016-09-11 02:50:14
Message-ID: dabf2408-b6a2-705c-8b43-bc775dd09cd6@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/8/16 11:35 PM, Tom Lane wrote:
>> This isn't simple because there are often *lots* of variants. You
>> > don't just want to see the "top 10" candidate plans, because they're
>> > probably a bunch of small variants on the same plan; the ones you'll
>> > be interested in will probably be very different plans with very bad
>> > relative estimates.
> The other big problem here is that the planner tries *very* hard to reject
> losing paths early; so it does not even form an explainable plan for a
> large fraction of the search space. (And if it did, you'd be dead before
> you got your EXPLAIN result back.)

What I've wished for is the ability to see plans that were close in cost
to the best case scenario, since that indicates that a slight change in
statistics would push the planner in another direction (sometimes with
disastrous results). Maybe allowing some number of plans to bubble up if
they were within X percent of the winner wouldn't be that horrible.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Malis 2016-09-11 03:02:51 Merge Join with an Index Optimization
Previous Message Corey Huinker 2016-09-10 23:04:27 Re: Let file_fdw access COPY FROM PROGRAM