Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C6122475C5F for ; Fri, 17 Jan 2003 02:00:49 -0500 (EST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 4CBB4475BC3 for ; Fri, 17 Jan 2003 02:00:49 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 11B2DD602; Thu, 16 Jan 2003 23:00:49 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 076C75C03; Thu, 16 Jan 2003 23:00:48 -0800 (PST) Date: Thu, 16 Jan 2003 23:00:48 -0800 (PST) From: Stephan Szabo To: Roman Fail Cc: Subject: Re: 7.3.1 New install, large queries are slow In-Reply-To: <9B1C77393DED0D4B9DAA1AA1742942DA0E4C09@pos_pdc.posportal.com> Message-ID: <20030116225602.G17408-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/173 X-Sequence-Number: 820 On Thu, 16 Jan 2003, Roman Fail wrote: > > Stephan Szabo wrote: > > Also you have two indexes on batchdetailid right now (primary key > > also creates one) which added to the confusion. > > The 7.3.1 docs for CREATE TABLE don't mention anything about automatic > index creation for a PRIMARY KEY. I didn't see any PK indexes via > pgAdminII, so I read this line from the docs and decided to create > them separately. > "Technically, PRIMARY KEY is merely a combination of UNIQUE and NOT NULL" Right, but the implementation of UNIQUE constraints in postgresql right now is through a unique index. That's not necessarily a guarantee for the future, but for right now you can rely on it.