Oliver Elphick writes:
> On Sat, 2005-08-20 at 15:33 -0700, CSN wrote:
>> select * from table1
>> where last_error is null
>> or extract(epoch from now()-last_error) > 86400;
> I don't know whether the planner would recognise that it could use an
> index on that condition.
The "is null" isn't in
On Sat, 2005-08-20 at 15:33 -0700, CSN wrote:
> Hi,
>
> I want to select records that haven't had an error
> (logged to last_error) in the last 24 hours. My query
> is:
>
> select * from table1
> where last_error is null
> or extract(epoch from now()-last_error) > 86400;
I don't know whether the
Hi,
I want to select records that haven't had an error
(logged to last_error) in the last 24 hours. My query
is:
select * from table1
where last_error is null
or extract(epoch from now()-last_error) > 86400;
I've created an index on last_error (timestamp with
time zone - can be NULL), then used