pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17110: [FEATURE REQUEST] Log all plans for a query instead of just showing the most optimal plan
2+ messages / 2 participants
[nested] [flat]

* BUG #17110: [FEATURE REQUEST] Log all plans for a query instead of just showing the most optimal plan
@ 2021-07-15 11:58 PG Bug reporting form <noreply@postgresql.org>
  2021-07-15 14:44 ` Re: BUG #17110: [FEATURE REQUEST] Log all plans for a query instead of just showing the most optimal plan David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2021-07-15 11:58 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: abhiroj95@gmail.com

The following bug has been logged on the website:

Bug reference:      17110
Logged by:          masterskipper
Email address:      abhiroj95@gmail.com
PostgreSQL version: 11.10
Operating system:   debian9
Description:        

Hi,

Recently, we had to optimize a query that was behaving differently on
different databases (because data distribution and selectivity on each DB
were different). The problem is that it is very very difficult today to
understand why is the DB selecting the query plan it shows (and not other
plans). For e.g. why prefer sequential scan over index scan? what were the
costs that it calculated which made it prefer sequential scan?

Investigating such issues will become way more user friendly rather than
doing a guess work in and out. I believe this is a valid request and would
request you to please consider some time to fix it.

Many Thanks,
Abhiroj



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #17110: [FEATURE REQUEST] Log all plans for a query instead of just showing the most optimal plan
  2021-07-15 11:58 BUG #17110: [FEATURE REQUEST] Log all plans for a query instead of just showing the most optimal plan PG Bug reporting form <noreply@postgresql.org>
@ 2021-07-15 14:44 ` David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2021-07-15 14:44 UTC (permalink / raw)
  To: abhiroj95@gmail.com <abhiroj95@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

On Thursday, July 15, 2021, PG Bug reporting form <noreply@postgresql.org>
wrote:

>
> Investigating such issues will become way more user friendly rather than
> doing a guess work in and out. I believe this is a valid request and would
> request you to please consider some time to fix it.
>
>
Feature requests are preferred on the -general list, leaving this one for
true bug reports.

As for this specific request it doesn’t seem like a good trade-off for the
planner to fully compute plans it knows aren’t going to ultimately be
selected to actually run.  So while putting an opt-in mechanism in place is
doable (e.g., maybe an explain all command) the rework necessary to
actually produce the relevant information is daunting; which seems to be
why the periodic requests for a such a feature don’t really get serious
consideration.  That, and the general belief that the query writer isn’t
expected (or mostly given the tools) to influence the chosen query plan
directly so such information would be difficult to act on.

In short, I agree the need is real but value/cost proposition for working
on such a feature seems very unfavorable.

David J.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-07-15 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 11:58 BUG #17110: [FEATURE REQUEST] Log all plans for a query instead of just showing the most optimal plan PG Bug reporting form <noreply@postgresql.org>
2021-07-15 14:44 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox