Re: why does this use the wrong index?

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: why does this use the wrong index?
Дата
Msg-id 1221849804.6194.297.camel@dell.linuxdev.us.dell.com
обсуждение исходный текст
Ответ на Re: why does this use the wrong index?  (Jeff Davis <pgsql@j-davis.com>)
Список 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 по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: why does this use the wrong index?
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Intel's X25-M SSD