Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 138CA9FB922 for ; Mon, 11 Jun 2007 11:30:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 31626-04 for ; Mon, 11 Jun 2007 11:30:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 070569FB8DB for ; Mon, 11 Jun 2007 11:30:53 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 41B1531448; Mon, 11 Jun 2007 16:30:52 +0200 (MET DST) From: "Sabin Coanda" X-Newsgroups: pgsql.sql Subject: cluster index on primary key Date: Mon, 11 Jun 2007 17:31:03 +0300 Organization: Hub.Org Networking Services Lines: 15 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/81 X-Sequence-Number: 28571 Hi there, I'd like to know when I create a primary key on a table, does postgres will create automatically an index on that table related to the primary key columns, or I have to create it explicitly ? If I have to create it explicitly, suppose I have tables with a serial primary key, or link tables with multiple column primary key. How is recommended for the two cases: to create an index on the primary key unique, or cluster or both or with none of the two options ? TIA, Sabin