Re: Rationalizing EXPLAIN VERBOSE output - Mailing list pgsql-hackers

From Gavin Sherry
Subject Re: Rationalizing EXPLAIN VERBOSE output
Date
Msg-id Pine.LNX.4.21.0203111554240.27056-100000@linuxworld.com.au
Whole thread Raw
In response to Re: Rationalizing EXPLAIN VERBOSE output  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Rationalizing EXPLAIN VERBOSE output  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Sun, 10 Mar 2002, Bruce Momjian wrote:

> Tom Lane wrote:

> > Seems kinda ugly.  But maybe same idea with repeated VERBOSE,
> > a la some Unix commands ("more -v's get you more detail"):
> > 
> >     EXPLAIN [ANALYZE] [VERBOSE] [ VERBOSE ... ] statement;
> > 

> 
> I was never a fan of the -v -v more-verbose options, and I don't see any
> case where we use such behavior in our code.  We do use detail levels
> for debug, and that is fairly common.

I agree. This is fine under Unix, but command arguments are not really a
grammar. Yacc doesn't enjoy terminal repetition and for good reason: it
usually suggests a clumsy grammar. 

Personally, I think that Tom's code should go into standard EXPLAIN.

As for how to returning explain data as a SELECT. I think I prefer
Oracle's idea of output tables with a Postgres twist. EXPLAIN could then
be something like:

EXPLAIN [VERBOSE] [SET ID='...' ] [INTO [TEMP] <table>] <query>

If 'table' exists, EXPLAIN would check if it is a valid explain output
table (correct attr names, types) and if so insert the results of explain,
one tuple per line of output. ID would be a text identifier of the output.

If the table didn't exist, it would be created. TEMP means that the table
is removed at the end of the session.

Is this overkill?

Gavin




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Rationalizing EXPLAIN VERBOSE output
Next
From: Bruce Momjian
Date:
Subject: Re: Rationalizing EXPLAIN VERBOSE output