Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.8.8/8.7.5) with ESMTP id MAA10206 for ; Thu, 9 Jul 1998 12:36:21 -0400 (EDT) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA02369 for ; Thu, 9 Jul 1998 12:35:29 -0400 (EDT) To: pgsql-sql@postgresql.org Subject: Single vs. multiple indexes Date: Thu, 09 Jul 1998 12:35:29 -0400 Message-ID: <2366.900002129@sss.pgh.pa.us> From: Tom Lane Question: what's the difference between making a single index covering multiple fields of the underlying table, and making a separate index for each of the fields? I understand that the semantics are different if I create a UNIQUE index: a unique index on a field enforces that every record in the table have a different value of that field, but a unique index on a set of fields only enforces that the combination of all those fields be unique in each record. Leaving that aside, what are the performance implications? Does one structure support fast execution of query types that the other doesn't, and if so which one's better for what? Is a single index cheaper to update than multiple indexes? Does it save disk space? regards, tom lane