Re: [HACKERS] Date operations - Mailing list pgsql-hackers

From Oliver Smith
Subject Re: [HACKERS] Date operations
Date
Msg-id 19990331123001.A22169@kfs.org
Whole thread Raw
In response to Date operations  (Oliver Smith <oliver@kfs.org>)
List 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 by date:

Previous
From: Oliver Smith
Date:
Subject: Date operations
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] [OT] Timezones and Daylight savings.