Re: timestamped archive data index searches - Mailing list pgsql-general

From Ralph Graulich
Subject Re: timestamped archive data index searches
Date
Msg-id Pine.LNX.4.21.0207211121080.1804-100000@shauny.shauny.de
Whole thread Raw
In response to Re: timestamped archive data index searches  ("Stephen Birch" <sgbirch@hotmail.com>)
List pgsql-general
Hi Stephen,


> SELECT MIN(tstamp) FROM det;
> This used a sequence scan even if I do a SET ENABLE_SEQSCAN to off.
> Shouldn't this also use an index?
[...]

Have a look at the thread I started under "max() not using index". I think
you can do the same trick to work around the min() problem if it's
logical. That'd be:

    SELECT tmstamp FROM det ORDER BY tmstamp ASC LIMIT 1;


Kind regards
... Ralph ...



pgsql-general by date:

Previous
From: "Stephen Birch"
Date:
Subject: Re: timestamped archive data index searches
Next
From: Bruno Wolff III
Date:
Subject: Re: timestamped archive data index searches