X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 74E2F479DBF for ; Fri, 31 Jan 2003 20:49:02 -0500 (EST) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id EC50D47DAFE for ; Fri, 31 Jan 2003 18:29:56 -0500 (EST) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2815469; Fri, 31 Jan 2003 15:30:04 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Don Bowman , "'pgsql-performance@postgresql.org'" Subject: Re: not using index for select min(...) Date: Fri, 31 Jan 2003 15:31:12 -0800 X-Mailer: KMail [version 1.4] References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200301311531.12605.josh@agliodbs.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/406 X-Sequence-Number: 1053 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 o= wn=20 aggregates), all aggregates will trigger a Seq Scan in a query. It's a=20 known drawrback that nobody has yet found a good way around. --=20 -Josh Berkus Aglio Database Solutions San Francisco