Re: BUG #5120: Performance difference between running a query with named cursor and straight SELECT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: smclellan(at)mintel(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5120: Performance difference between running a query with named cursor and straight SELECT
Date: 2009-10-15 20:36:04
Message-ID: 13255.1255638964@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Steve McLellan <smclellan(at)mintel(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Ryan Douglas 2009-10-15 20:45:54 BUG #5121: Segmentation Fault when using pam w/ krb5
Previous Message Steve McLellan 2009-10-15 20:09:43 Re: BUG #5120: Performance difference between running a query with named cursor and straight SELECT