Re: Optimizing >= and <= for numbers and dates

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Optimizing >= and <= for numbers and dates
Дата
Msg-id 1065033355.381.97.camel@tokyo
обсуждение исходный текст
Ответ на Re: Optimizing >= and <= for numbers and dates  ("Dimitri Nagiev" <dnagiev@gmx.de>)
Список pgsql-performance
On Wed, 2003-10-01 at 13:45, Dimitri Nagiev wrote:
> template1=# explain analyze select * from mytable where
> mydate>='2003-09-01';
>                                                   QUERY PLAN
>
>
> ---------------------------------------------------------------------------------------------------------------
>  Seq Scan on mytable  (cost=0.00..2209.11 rows=22274 width=562) (actual
> time=0.06..267.30 rows=22677 loops=1)
>    Filter: (mydate >= '2003-09-01'::date)
>  Total runtime: 307.71 msec
> (3 rows)

It may well be the case that a seqscan is faster than an index scan for
this query. Try disabling sequential scans (SET enable_seqscan = false)
and re-running EXPLAIN ANALYZE: see if the total runtime is smaller or
larger.

-Neil



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

Предыдущее
От: Oleg Lebedev
Дата:
Сообщение: Re: TPC-R benchmarks
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: Optimizing >= and <= for numbers and dates