Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id ECF6D475D17 for ; Fri, 19 Jul 2002 14:12:45 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1583575; Fri, 19 Jul 2002 11:12:45 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Bruno Wolff III Subject: Re: Two Index Questions Date: Fri, 19 Jul 2002 11:12:49 -0700 X-Mailer: KMail [version 1.4] Cc: pgsql-sql@postgresql.org References: <200207190933.59283.josh@agliodbs.com> <200207191028.18547.josh@agliodbs.com> <20020719175638.GA14836@wolff.to> In-Reply-To: <20020719175638.GA14836@wolff.to> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207191112.49885.josh@agliodbs.com> X-Archive-Number: 200207/307 X-Sequence-Number: 8685 Bruno, Tom, > Typo. I meant to say columns. The issue is that max doesn't use an index, > but if there are a lot of different values of G for a given A, B and C, > it may be better to use an index then to search through the applicable > rows to find the maximum. That's odd ... you're correct. Tom, why doesn't MAX() use an index? I= =20 understand why indexes are generally useless for SUM(), AVG, and COUNT, but= =20 it seems that MAX() and MIN() should *always* use an index. --=20 -Josh Berkus Aglio Database Solutions San Francisco