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

From: Steve McLellan <smclellan(at)mintel(dot)com>
To: 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 21:50:48
Message-ID: cfca83d70910151450t5dcb5d16j946520fe2ca1e4f9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>Since that's on the outside of a nestloop, the 169x rowcount error
>translates directly to a 169x error in the total runtime estimate ---
>and it looks like that's not very far at all from the real ratio,
>so the other estimates are pretty good.

You're correct - the query's exercising a very small subset of that table.
The table has 400,000 rows, of which only 400 have Originator Type = 'NO
DATA', and ALL the rows with those two Areas have Originator Type = 'NO
DATA'. As you say, increasing the stats target may not make much difference
because of the size of this sample when compared to the overall data set (in
fact the production servers have it set to 700 and it makes little
real-world difference), so we'll go with your initial suggestion and upgrade
to 8.4. Thanks again; this has been an good set of lessons to learn.

Steve

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-10-15 22:07:08 Re: BUG #5121: Segmentation Fault when using pam w/ krb5
Previous Message Douglas, Ryan 2009-10-15 21:47:03 Re: BUG #5121: Segmentation Fault when using pam w/ krb5