Re: [HACKERS] Date operations

Поиск
Список
Период
Сортировка
От Oliver Smith
Тема Re: [HACKERS] Date operations
Дата
Msg-id 19990331123001.A22169@kfs.org
обсуждение исходный текст
Ответ на Date operations  (Oliver Smith <oliver@kfs.org>)
Список pgsql-hackers
On Wed, Mar 31, 1999 at 11:57:40AM +0100, Oliver Smith wrote:
> Question 2:

Oh - and 

Question 3:

Because this query gets hit a lot, would it make sense to create an
index
CREATE INDEX tbl_robot_logs_at_age_idx ON tbl_robot_logs ( AGE(at) );

If so - how should I word the query to use this?
SELECT * FROM tbl_robot_logs WHERE email = '$email' AND action = 'sent'   AND AGE(at) > '-1 hour'::timespan;

Will the query optimizer recognise that it has an index to suit this?


Oliver
-- 
If at first you don't succeed, skydiving is not for you...


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

Предыдущее
От: Oliver Smith
Дата:
Сообщение: Date operations
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] [OT] Timezones and Daylight savings.