Re: [HACKERS] Date operations

From: Oliver Smith <oliver(at)kfs(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Date operations
Date: 1999-03-31 11:30:01
Message-ID: 19990331123001.A22169@kfs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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...

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-03-31 15:47:04 Re: [HACKERS] [OT] Timezones and Daylight savings.
Previous Message Oliver Smith 1999-03-31 10:57:40 Date operations