Re: not using index for select min(...)

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Don Bowman <don(at)sandvine(dot)com>, "'pgsql-performance(at)postgresql(dot)org'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: not using index for select min(...)
Date: 2003-01-31 23:31:12
Message-ID: 200301311531.12605.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Sullivan 2003-01-31 23:51:49 Re: Linux.conf.au 2003 Report
Previous Message Andrew Sullivan 2003-01-31 23:31:04 Re: not using index for select min(...)

Browse pgsql-performance by date

  From Date Subject
Next Message Bruno Wolff III 2003-02-01 01:02:29 Re: not using index for select min(...)
Previous Message Andrew Sullivan 2003-01-31 23:31:04 Re: not using index for select min(...)