Re: BUG #5120: Performance difference between running a query with named cursor and straight SELECT - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5120: Performance difference between running a query with named cursor and straight SELECT
Date
Msg-id 13255.1255638964@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5120: Performance difference between running a query with named cursor and straight SELECT  (Steve McLellan <smclellan@mintel.com>)
List pgsql-bugs
Steve McLellan <smclellan@mintel.com> writes:
> Thanks! Installing 8.4 and setting cursor_tuple_fraction to 1.0 does seem to
> force it to execute in the same time as not using the cursor, and we'll
> probably go with this solution (the only reason we're using cursors is to
> avoid retrieving vast result sets through psycopg2/fetchmany). Your
> explanation makes sense, and I'm curious to see why this particular query
> ends up being so different, but I couldn't figure out how to run the explain
> - the DECLARE syntax doesn't seem to allow it.

"EXPLAIN [ANALYZE] DECLARE x CURSOR ..." works for me.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Richard Neill
Date:
Subject: Re: Postgresql 8.4.1 segfault, backtrace
Next
From: "Ryan Douglas"
Date:
Subject: BUG #5121: Segmentation Fault when using pam w/ krb5