Two Index Questions

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Two Index Questions
Date: 2002-07-19 16:33:59
Message-ID: 200207190933.59283.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 indexes
on A, B and C? I've run a few tests, but I don't have enough data in the
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
for DESC alpha sorts. Has this been resolved? If so, does one need to
create any special indexes to take advantage of indexes for DESC sorts?

Thanks for your help!

--
-Josh Berkus
Aglio Database Solutions
San Francisco

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-07-19 16:44:07 Re: Two Index Questions
Previous Message Thomas Swan 2002-07-19 15:39:32 Re: [GENERAL] id and ID in CREATE TABLE