Re: Timestamp indicies not being used! - Mailing list pgsql-general

From Tom Lane
Subject Re: Timestamp indicies not being used!
Date
Msg-id 627.1248020430@sss.pgh.pa.us
Whole thread Raw
In response to Re: Timestamp indicies not being used!  (Andreas Kretschmer <akretschmer@spamfence.net>)
Responses [SOLVED] Re: Timestamp indicies not being used!
List pgsql-general
Andreas Kretschmer <akretschmer@spamfence.net> writes:
> Sam Mason <sam@samason.me.uk> wrote:
>> Based on your query, I think you want a multi-column index---probably on
>> (id,zulu_timestamp).
>>
>> The problem with just having an index on either column is that it's
>> difficult to combine them and PG hence just thinks that it will be

> Since 8.1 PG can do an bitmap index scan using both indexes...

... which produces an unordered result, so it's pretty useless for this
problem.  I concur with Sam's suggestion.

            regards, tom lane

pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: Timestamp indicies not being used!
Next
From: David Andersen
Date:
Subject: A powerful feature for easier error finding