Re: Scrollable cursors and Sort performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Scrollable cursors and Sort performance
Дата
Msg-id 23202.1141082436@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Scrollable cursors and Sort performance  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> On Mon, Feb 27, 2006 at 06:01:21PM -0500, Tom Lane wrote:
>> There is no EXPLAIN ANALYZE DECLARE, and AFAICS it would be a
>> contradiction in terms to have one, since DECLARE doesn't run the query.

> You have no idea how glad I am that I'm not the only one who doesn't know about
> 'new' features (this first appeared in the docs in 7.4)... :)

> decibel=# explain analyze declare test cursor for select * from pg_users;
>                         QUERY PLAN                        
> ----------------------------------------------------------
>  Seq Scan on pg_authid  (cost=0.00..1.01 rows=1 width=79)
>    Filter: rolcanlogin
> (2 rows)

Please notice that it didn't run the query (no actual-time data).

Perhaps it would be better if the code raised an error instead of
silently ignoring the ANALYZE keyword.  I think this behavior
was chosen on the grounds that since DECLARE doesn't run the query,
it's consistent for EXPLAIN ANALYZE DECLARE to be a no-op as well.
But it's confusing now that I look at it again.  In any case,
one should clearly need to say FETCH to get a cursor to execute.
        regards, tom lane


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Scrollable cursors and Sort performance
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Dead Space Map