От: Tom Lane
Тема: Re: timestamp indexing
Дата: ,
Msg-id: 24839.1117475874@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: timestamp indexing  (Tobias Brox)
Ответы: Re: timestamp indexing  (Tobias Brox)
Список: pgsql-performance

Скрыть дерево обсуждения

timestamp indexing  (Tobias Brox, )
 Re: timestamp indexing  (Michael Fuhr, )
  Re: timestamp indexing  (Tobias Brox, )
   Re: timestamp indexing  (Tom Lane, )
    Re: timestamp indexing  (Tobias Brox, )
     Re: timestamp indexing  (Tobias Brox, )
      Re: timestamp indexing  ("Jim C. Nasby", )
       Re: timestamp indexing  (Tobias Brox, )

Tobias Brox <> writes:
>> What version of PostgreSQL are you using?

> Also answered in my follow-up - "not yet pg8" :)

Your followup hasn't shown up here yet, but if the query is written like
    WHERE timestampcol >= now() - interval 'something'
then the pre-8.0 planner is not capable of making a good estimate of the
selectivity of the WHERE clause.  One solution is to fold the timestamp
computation to a constant on the client side.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Mark Kirkwood
Дата:
Сообщение: Re: tuning
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: poor performance involving a small table