Re: Query with date where clause is very slow - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Query with date where clause is very slow
Date
Msg-id dcc563d10902192131o2849fbb1ra9c0dad12a5801a7@mail.gmail.com
Whole thread Raw
In response to Re: Query with date where clause is very slow  (Mike Christensen <imaudi@comcast.net>)
List pgsql-general
On Thu, Feb 19, 2009 at 10:17 PM, Mike Christensen <imaudi@comcast.net> wrote:
> I'd tell you, but I lost the database last night <g>
>
> I'll go rebuild the test data but it'll take a while.
>

I assume the data was properly representative of the real data, and
that you were running analyze; before running any queries.  Normally
when you see this kind of slow down it's that postgresql picked a bad
query plan because of bad estimates.  Most bad estimates can be fixed
with simple increases in the the stats target for the offending
column.  Sometimes it takes more than that.  Look for numbers of row
estimated versus actual rows returned, and loops.

pgsql-general by date:

Previous
From: Mike Christensen
Date:
Subject: Re: Query with date where clause is very slow
Next
From: Mike Christensen
Date:
Subject: Question about functions that return a set of records