Re: database performance and query performance question

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: database performance and query performance question
Дата
Msg-id 1074804406.2592.2.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Re: database performance and query performance question  ("Shea,Dan [CIS]" <Dan.Shea@ec.gc.ca>)
Ответы Re: database performance and query performance question
Список pgsql-performance
Shea,Dan [CIS] kirjutas N, 22.01.2004 kell 22:35:
> Something that I do not understand is why if you use a valid_time =
> '2004-01-22 00:00:00' the query will use the index but if you do a
> valid_time >  '2004-01-22 00:00:00' it does not use the index?

It probably can't tell if > is selective enough to justify using index.

Together with "limit 10" it may be.

You could try

explain analyze select * from forecastelement where valid_time between
'2004-01-22'::date and '2004-01-22'::date limit 10;

to see if this is considered good enough.

--------------
Hannu


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: database performance and query performance question
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: database performance and query performance question