Re: Rationalizing EXPLAIN VERBOSE output
От | Bruce Momjian |
---|---|
Тема | Re: Rationalizing EXPLAIN VERBOSE output |
Дата | |
Msg-id | 200203110521.g2B5LTk27484@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Rationalizing EXPLAIN VERBOSE output (Gavin Sherry <swm@linuxworld.com.au>) |
Ответы |
Re: Rationalizing EXPLAIN VERBOSE output
|
Список | 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@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: