Re: Rationalizing EXPLAIN VERBOSE output

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Rationalizing EXPLAIN VERBOSE output
Date: 2002-03-09 23:49:20
Message-ID: 200203092349.g29NnKJ21669@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Now that Bruce has done some work on rationalizing elog() output, seems
> like we ought to take another look at EXPLAIN VERBOSE. Currently, that
> command does this:

Yes, the elog() tags finally match some reality. :-)

> 1. A non-pretty-printed plan dump (nodeToString output) is sent to
> elog(INFO). Formerly that always output to both postmaster log and
> client, but now it'll typically go only to the client.
>
> 2. The short-form output (same as non-VERBOSE EXPLAIN) is sent to
> elog(INFO). See above.
>
> 3. The pretty-printed plan dump is sent to postmaster stdout.
>
> Now postmaster stdout is just about the least good destination we
> could possibly use. It may well end up in the bit bucket (if someone is
> only saving stderr output, and/or is using syslog logging instead of
> stderr). In any case it's not necessarily an easy place for the client
> to get at.

Seems EXPLAIN may need a level capability like DEBUG1-5 now. We have
EXPLAIN and EXPLAIN VERBOSE. Now have pretty print vs. "jumble" print,
which some people do actually prefer. They must have better cognitive
skills than me.

We now also have the index clause printing that you mentioned. Should
we go with some kind of numeric level to EXPLAIN that would control
this?

That is the only simple solution I can think of. GUC seems way beyond
what someone would want. Having SET control EXPLAIN just seems overkill
because EXPLAIN should be able to control itself.

Also, clearly, we need to fix the output of pretty print to honor ELOG
control, and in any other places we may have missed it.

How about?

EXPLAIN select * from pg_class;
EXPLAIN VERBOSE select * from pg_class;
EXPLAIN VERBOSE 1 select * from pg_class;
EXPLAIN VERBOSE 5 select * from pg_class;

Seems pretty clear. VERBOSE takes an optional argument that controls
the level of detail.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-03-09 23:58:56 Re: [PATCHES] Small fix for _equalValue()
Previous Message Thomas Lockhart 2002-03-09 23:43:16 Re: [PATCHES] Small fix for _equalValue()