X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 561C4475C3D for ; Thu, 1 May 2003 19:35:26 -0400 (EDT) Received: from habitrail.home.fools-errant.com (hacksaw.org [216.41.5.170]) by postgresql.org (Postfix) with ESMTP id D2F93474E4F for ; Thu, 1 May 2003 19:35:24 -0400 (EDT) Received: from habitrail.home.fools-errant.com (localhost [127.0.0.1]) by habitrail.home.fools-errant.com (8.12.8/8.12.4) with ESMTP id h41NZGwt022520; Thu, 1 May 2003 19:35:16 -0400 Received: from habitrail.home.fools-errant.com (hacksaw@localhost) by habitrail.home.fools-errant.com (8.12.8/8.12.4/Submit) with ESMTP id h41NZF2J022516; Thu, 1 May 2003 19:35:16 -0400 Message-Id: <200305012335.h41NZF2J022516@habitrail.home.fools-errant.com> X-Mailer: exmh version 2.6.1 02/18/2003 with nmh-1.0.4 To: Andrew Sullivan Cc: pgsql-admin@postgresql.org Subject: Re: Impact of loss of unique SERIAL? In-reply-to: Your message of "Wed, 30 Apr 2003 10:21:32 EDT." <20030430142132.GB6618@libertyrms.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 01 May 2003 19:35:15 -0400 From: Hacksaw X-Spam-Status: No, hits=-11.3 required=5.0 tests=BAYES_10,IN_REP_TO,MSG_ID_ADDED_BY_MTA_3,QUOTED_EMAIL_TEXT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/20 X-Sequence-Number: 8582 > From: Andrew Sullivan > I don't actually recall the argument for removing the automatic > unique index. But it's easy enough at the time of creation, since > you could specify a UNIQUE constraint on the column anyway. Well, I've no idea what the PostgreSQL's particular argument might have been, but too many indices typically means slower lookups. You want the indices to be created based on the fields you will most often mention in WHERE statements. A unique serial number is always useful, but might not be looked at unless the the final output is a surprising number of records, like two, where one is expected. No point in indexing it then. -- Music is a quality, organised in sound and in time. http://www.hacksaw.org -- http://www.privatecircus.com -- KB1FVD