From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Scrollable cursors and Sort performance |
Date: | 2006-02-27 23:20:36 |
Message-ID: | 23202.1141082436@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
"Jim C. Nasby" <jnasby(at)pervasive(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-02-27 23:39:06 | Re: Dead Space Map |
Previous Message | Jim C. Nasby | 2006-02-27 23:12:05 | Re: Scrollable cursors and Sort performance |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-02-28 05:45:18 | Re: [HACKERS] how solve diff of API counstruct_md_array between |
Previous Message | Jim C. Nasby | 2006-02-27 23:12:05 | Re: Scrollable cursors and Sort performance |