Re: Re: [GENERAL] contrib/plantuner - enable PostgreSQL planner hints

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: Re: [GENERAL] contrib/plantuner - enable PostgreSQL planner hints
Date: 2009-10-13 19:46:59
Message-ID: 603c8f070910131246k3d7c336boc72e77008fb7a375@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, Oct 13, 2009 at 10:14 AM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
>> I sometimes want to know what the planner thinks the cost of some
>> plan other than the one actually selected would be.
>
> Another DBMS I used for years had a way to turn on an *extremely*
> verbose mode for their planner; it showed everything it considered
> with its related cost information.  Even a moderately complex query
> generated hundreds or thousands of lines of output, so I rarely used
> it; but for those particularly stubborn queries, where you just can't
> understand why it's picking the plan it is, a little work wading
> through the output would *always* clear up the mystery.
>
> Now that we can generate EXPLAIN output in more structured formats,
> perhaps we could think about adding an "extremely verbose" mode where
> the planner would "think out loud" as a whole separate section from
> where we show the chosen plan?

I wouldn't object to such a thing, but for simple cases I think it
would be more convenient to modify the planner's assumptions and then
try replanning. An exhaustive dump of everything the planner has
considered is going to be a LOT of data, and I don't really want to
have to set up a graphical visualization tool every time I have a
planning question. I am a command-line kind of guy...

...Robert

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 2009-10-13 20:44:09 SFPUG: Video from "Statistics and Postgres — How the Planner Sees Your Data"
Previous Message gmb 2009-10-13 19:33:55 Re: Possible encoding issue (win7)

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2009-10-13 20:13:35 Re: Client application name
Previous Message Joshua D. Drake 2009-10-13 18:48:52 Re: Re: [GENERAL] contrib/plantuner - enable PostgreSQL planner hints