Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 3C06F632C55 for ; Wed, 18 Aug 2010 10:55:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 10449-04 for ; Wed, 18 Aug 2010 13:54:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from depesz.com (martin.depesz.com [188.40.39.14]) by mail.postgresql.org (Postfix) with ESMTP id 0679F632C10 for ; Wed, 18 Aug 2010 10:54:59 -0300 (ADT) Received: from martin.depesz.com ([188.40.39.14] helo=depesz.com) by depesz.com with esmtpa (Exim 4.69) (envelope-from ) id 1Olj6W-0004eu-Pd; Wed, 18 Aug 2010 15:54:57 +0200 Date: Wed, 18 Aug 2010 15:54:56 +0200 From: hubert depesz lubaczewski To: Clemens Eisserer Cc: pgsql-performance@postgresql.org Subject: Re: Are Indices automatically generated for primary keys? Message-ID: <20100818135456.GA17355@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/196 X-Sequence-Number: 40039 On Wed, Aug 18, 2010 at 03:51:22PM +0200, Clemens Eisserer wrote: > Hi, > > Are indices for columns marked with "PRIMARY KEY" automatically generated by > postgresql, or do I have to do it manually? > The question might seem dumb, I ask because I remember from working with > MySQL it generates indices automatically in this case. they are generated automatically. Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007