From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Rationalizing EXPLAIN VERBOSE output |
Date: | 2002-03-11 05:21:29 |
Message-ID: | 200203110521.g2B5LTk27484@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Gavin Sherry wrote:
> 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.
I am confused. Which grammar do you like?
> 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?
That was my initial reaction. :-)
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Gavin Sherry | 2002-03-11 05:22:50 | Re: Rationalizing EXPLAIN VERBOSE output |
Previous Message | Bruce Momjian | 2002-03-11 05:19:04 | Re: Rationalizing EXPLAIN VERBOSE output |