Re: why does this use the wrong index? - Mailing list pgsql-performance

From Jeff Davis
Subject Re: why does this use the wrong index?
Date
Msg-id 1221849804.6194.297.camel@dell.linuxdev.us.dell.com
Whole thread Raw
In response to Re: why does this use the wrong index?  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-performance
On Fri, 2008-09-19 at 11:25 -0700, Jeff Davis wrote:
> What's the n_distinct for start_time?

Actually, I take that back. Apparently, PostgreSQL can't change "x
BETWEEN y AND y" into "x=y", so PostgreSQL can't use n_distinct at all.

That's your problem. If it's one day only, change it to equality and it
should be fine.

Regards,
    Jeff Davis


pgsql-performance by date:

Previous
From: Jeff Davis
Date:
Subject: Re: why does this use the wrong index?
Next
From: Greg Smith
Date:
Subject: Re: Intel's X25-M SSD