Re: machine-readable explain output
От | Andres Freund |
---|---|
Тема | Re: machine-readable explain output |
Дата | |
Msg-id | 4A377FB6.7040601@anarazel.de обсуждение исходный текст |
Ответ на | machine-readable explain output (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: machine-readable explain output
|
Список | pgsql-hackers |
Hi, On 06/12/2009 07:15 AM, Robert Haas wrote: > If you don't like the syntax, please argue about that on the "generic > explain options v2" thread. Let's try to use this thread to discuss > the output format, about which I spent a good deal of time agonizing. I spent some time playing around with the explain output with various queries. Beside the already raised mild dislike (from Peter Eisentraut I think) of Upper-Case "-" seperated tag-names I found mainly one gripe: <Startup-Cost>1710.98</Startup-Cost> <Total-Cost>1710.98</Total-Cost> <Plan-Rows>72398</Plan-Rows> <Plan-Width>4</Plan-Width> <Actual-Startup-Time>136.595</Actual-Startup-Time> <Actual-Total-Time>136.595</Actual-Total-Time> <Actual-Rows>72398</Actual-Rows> <Actual-Loops>1</Actual-Loops> This is a bit inconsistent. i.e. for the row estimate you use <Plan-Rows/> and for <Startup-Cost/> you dont use the "Plan-" Prefix. While for the 'analyze' generated variables you use the 'Actual-' prefix consistently. One approach would be to have two nodes like: <Plan-Estimates> <Startup-Cost>...</Startup-Cost> ... </Plan-Estimates> <Execution-Cost> <Startup-Cost>...</Startup-Cost> ... </Execution-Cost> This would probably make it easier to write a future proof parser and it also seems semantically sensible. As an aside issue it would perhaps be nice (thinking of an index-suggestion tool) to make it possible for having seperate estimates on <Index-Cond> an <Filter> - In order not to change the format later that perhaps has to be considered here. Perhaps the current structure + some additional tags is also the best here - I just noticed it being a potential issue. Andres
В списке pgsql-hackers по дате отправления: