Re: SELECT min(id) FROM test; uses seqscan - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: SELECT min(id) FROM test; uses seqscan
Date
Msg-id Pine.LNX.4.30.0105031743300.900-100000@peter.localdomain
Whole thread Raw
In response to SELECT min(id) FROM test; uses seqscan  (pgsql-bugs@postgresql.org)
List pgsql-bugs
> SELECT min(id) FROM test; uses sequential scan even if an index on "id" exists. VACUUM ANALYZE doesn't help.

This is not a bug.  In the current implementation, min and max cannot make
use of an index directly.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL bug in SELECT DISTINCT
Next
From: antipode@thpoon.com
Date:
Subject: Documentation bug for pg_ctl (-s option not documented)