Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 4F49F47590B for ; Fri, 19 Jul 2002 12:33:50 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1583436 for pgsql-sql@postgresql.org; Fri, 19 Jul 2002 09:33:54 -0700 Content-Type: text/plain; charset="us-ascii" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: pgsql-sql@postgresql.org Subject: Two Index Questions Date: Fri, 19 Jul 2002 09:33:59 -0700 X-Mailer: KMail [version 1.4] MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207190933.59283.josh@agliodbs.com> X-Archive-Number: 200207/299 X-Sequence-Number: 8677 Folks (esp. Tom, Stephan, and Bruce): I have two questions for my "Adventures in PostgreSQL" article reasearch: Multi-Column Indexes and GROUP BY: Q: If you group a table by multiple colums, e.g. SELECT t1.A, t1.B, t1.C, MAX(t1.G) FROM t1 GROUP BY t1.A, t1.B, t1.C Then would a multi-column index on A, B, C be faster than seperate indexe= s=20 on A, B and C? I've run a few tests, but I don't have enough data in the= =20 seperate tables to really get a feel for the difference. DESC Alpha Sort Indexes: Q: In PostgreSQL 7.0, there was an issue that indexes where never consulted= =20 for DESC alpha sorts. Has this been resolved? If so, does one need to=20 create any special indexes to take advantage of indexes for DESC sorts? Thanks for your help! --=20 -Josh Berkus Aglio Database Solutions San Francisco