Re: timestamped archive data index searches

From: Ralph Graulich <maillist(at)shauny(dot)de>
To: Stephen Birch <sgbirch(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: timestamped archive data index searches
Date: 2002-07-21 09:22:21
Message-ID: Pine.LNX.4.21.0207211121080.1804-100000@shauny.shauny.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pankaj Naug 2002-07-21 09:55:22
Previous Message Stephen Birch 2002-07-21 07:32:22 Re: timestamped archive data index searches