From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Jeff Amiel" <JAmiel(at)istreamimaging(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: The planner hates me. |
Date: | 2008-09-25 16:06:01 |
Message-ID: | dcc563d10809250906n3e90e3b1r602db291de8594e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Sep 25, 2008 at 9:38 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> The problem you've got here is that the planner has got absolutely no
> visibility into the behavior of get_dates(). In particular it doesn't
> realize that the values being generated are close to the end of the
> range of dates that are in the table, and thus the date1 >= dates.date
> condition is far more selective than the date2 < dates.date condition.
> If you look closely at the rowcount estimates you'll see that those are
> actually being estimated the same, to within roundoff error. So looking
> at two indexes instead of one doesn't look like a win to it.
Couldn't they make a simple immutable function and index on that?
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Yao | 2008-09-25 16:22:25 | Re: how can I find out the numeric directory name of each database in PostgreSQL 8.3 |
Previous Message | Scott Marlowe | 2008-09-25 16:04:36 | Re: The planner hates me. |