Re: The planner hates me.

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: The planner hates me.
Дата
Msg-id dcc563d10809250906n3e90e3b1r602db291de8594e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: The planner hates me.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: The planner hates me.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Sep 25, 2008 at 9:38 AM, Tom Lane <tgl@sss.pgh.pa.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?

В списке pgsql-general по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: The planner hates me.
Следующее
От: Justin Yao
Дата:
Сообщение: Re: how can I find out the numeric directory name of each database in PostgreSQL 8.3