Re: Compound Indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com>
Cc: "Chris Browne" <cbbrowne(at)acm(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Compound Indexes
Date: 2007-08-15 02:15:21
Message-ID: 20500.1187144121@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com> writes:
> Thank you so much! My only concern, probably a hangover from the MySQL
> world, is that if I have 5 of 6 indices, what would that do to INSERT
> and UPDATE performance if all these indices have to be updated? Is
> updating individual indices faster than one large compound index?

Probably slower, but the compound index is enough more specialized that
it's not as useful as the individual indexes. (I suspect that that
compound index in MySQL didn't do you nearly as much good as you
thought, either.) You should read
http://www.postgresql.org/docs/8.2/static/indexes-bitmap-scans.html
and nearby sections of the manual.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-08-15 02:35:03 Re: Insert or Replace or \copy (bulkload)
Previous Message Ow Mun Heng 2007-08-15 02:06:50 Re: Insert or Replace or \copy (bulkload)