Re: database performance and query performance question

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: database performance and query performance question
Дата
Msg-id 1074814717.2592.8.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Re: database performance and query performance question  ("Shea,Dan [CIS]" <Dan.Shea@ec.gc.ca>)
Список pgsql-performance
Shea,Dan [CIS] kirjutas N, 22.01.2004 kell 23:32:
> The end date in the previous example was actually invalid  between
> '2004-01-12'::date and '2003-01-12'::date;
> There have been multiple inserts since I recreated the index but it took
> quite some time to complete the following
> PWFPM_DEV=# explain analyze select * from forecastelement where valid_time
> between '2004-01-12'::date and '2004-01-13'::date;

You could try ORDER BY to bias the optimiser towards using an index:

explain analyze
 select *
  from forecastelement
 where valid_time > '2004-01-12'::date
 order by valid_time
 limit 10;

This also may be more close to what you are expecting :)

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


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

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