Re: [BUGS] BUG #2429: Explain does not report object's schema

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: [BUGS] BUG #2429: Explain does not report object's schema
Дата
Msg-id 20060516174726.GI26212@pervasive.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #2429: Explain does not report object's schema  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
Ответы Re: [BUGS] BUG #2429: Explain does not report object's schema  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
Список pgsql-hackers
On Tue, May 16, 2006 at 04:36:36PM +0530, Gurjeet Singh wrote:
>    I don't think adding a schema_name to EXPLAIN's output, is really
> a good idea!! The ALIAS feature of the SQL language caters to this
> very need of assigning unambiguous names to tables.
That's assuming that the query was written with aliases. Otherwise you
have to go back and manually add them, which can be a royal pain for a
large, complex query.

>    And we should be careful when adding any special code for EXPLAIN
> [ ANALYZE ]. For an example what would happen if we do that, consider
> this:
> 
>    If a big JOIN query takes N minutes on MS SQL Server, and I wish
> to see the plan why it is taking that long, one would expect me to
> enable 'Show Execution Plan'  in the SQL Query Analyzer (similar to
> PG's EXPLAIN ANALYZE). And when I do that, the query now takes more
> than 2*N minutes to come back. I assume this extra delay is caused by
> the overhead of extra processing it does at row-source level (like how
> many rows passed through this row-source, average row-size, etc.).

How does that have anything to do with adding query names to EXPLAIN
output??

The only argument against this that makes any sense to me is that
EXPLAIN is plenty verbose as it is, and we don't need to be making it
worse. But that's a non-issue if showing the schema names is optional.

One way to address this would be to add a verbosity level to EXPLAIN.
Right now, EXPLAIN VERBOSE is pretty useless to users, but there is
additional information that would be handy to get from explain at
different levels:

"side effect" timing, such as time spent in triggers, constraints, etc.
This is there in HEAD for triggers.

Information about what other plans were considered.

More explicit naming information.

Information about statements that ran inside a function (ie: EXPLAIN
SELECT function_name() is pretty useless today).

Having a means to specify a verbosity level would allow for adding these
kind of features without needlessly cluttering up a run-of-the-mill
EXPLAIN.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Compression and on-disk sorting
Следующее
От: "Gurjeet Singh"
Дата:
Сообщение: Re: [BUGS] BUG #2429: Explain does not report object's schema