Re: Rationalizing EXPLAIN VERBOSE output

Поиск
Список
Период
Сортировка
От Gavin Sherry
Тема Re: Rationalizing EXPLAIN VERBOSE output
Дата
Msg-id Pine.LNX.4.21.0203111554240.27056-100000@linuxworld.com.au
обсуждение исходный текст
Ответ на Re: Rationalizing EXPLAIN VERBOSE output  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Rationalizing EXPLAIN VERBOSE output  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Rationalizing EXPLAIN VERBOSE output
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Rationalizing EXPLAIN VERBOSE output