Re: not using index for select min(...) - Mailing list pgsql-performance

From Josh Berkus
Subject Re: not using index for select min(...)
Date
Msg-id 200301311531.12605.josh@agliodbs.com
Whole thread Raw
In response to not using index for select min(...)  (Don Bowman <don@sandvine.com>)
Responses Re: not using index for select min(...)
List pgsql-performance
Don,

> I have a table which is very large (~65K rows). I have
> a column in it which is indexed, and I wish to use for
> a join. I'm finding that I'm using a sequential scan
> for this when selecting a MIN.

Due to Postgres' system of extensible aggregates (i.e. you can write your own
aggregates), all aggregates will trigger a Seq Scan in a query.   It's a
known drawrback that nobody has yet found a good way around.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


pgsql-performance by date:

Previous
From: Don Bowman
Date:
Subject: not using index for select min(...)
Next
From: Andrew Sullivan
Date:
Subject: Re: not using index for select min(...)