Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 9E2DA2E00C2 for ; Thu, 8 May 2008 17:24:12 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 12401-01-8 for ; Thu, 8 May 2008 17:24:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.69]) by developer.postgresql.org (Postfix) with ESMTP id 422EB2E0086 for ; Thu, 8 May 2008 17:02:01 -0300 (ADT) Received: from mac.com (asmtp002-s [10.150.69.65]) by smtpoutm.mac.com (Xserve/smtpout006/MantshX 4.0) with ESMTP id m48JnW9k027090 for ; Thu, 8 May 2008 12:49:32 -0700 (PDT) Received: from [192.168.2.24] (p579e9b37.dip.t-dialin.net [87.158.155.55]) (authenticated bits=0) by mac.com (Xserve/asmtp002/MantshX 4.0) with ESMTP id m48JnReN004846 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 8 May 2008 12:49:30 -0700 (PDT) Message-Id: <8A21EAB9-9D04-480F-A952-4294178F4374@mac.com> From: Asche To: pgsql-performance@postgresql.org In-Reply-To: <050368ea-4090-4d4e-aef7-b9f2ac06da56@x35g2000hsb.googlegroups.com> Content-Type: multipart/alternative; boundary=Apple-Mail-7-40732653 Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Creating indexes Date: Thu, 8 May 2008 21:49:26 +0200 References: <050368ea-4090-4d4e-aef7-b9f2ac06da56@x35g2000hsb.googlegroups.com> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL=-0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200805/131 X-Sequence-Number: 30099 --Apple-Mail-7-40732653 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi, > Hi, all. I want to ask what type of index is better to create for > bigint types. I have table with bigint (bigserial) primary key. What http://www.postgresql.org/docs/8.3/static/sql-createtable.html PostgreSQL automatically creates an index for each unique constraint and primary key constraint to enforce uniqueness. Thus, it is not necessary to create an index explicitly for primary key columns. > type is better to use for it? I tried btree and hash, but didn't You already have an index on your bigint primary key. I think it is of type btree. Jan --Apple-Mail-7-40732653 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
Hi,

Hi, = all. I want to ask what type of index is better to create = for
bigint types. I have = table with bigint (bigserial) primary key. = What


PostgreSQL automatically creates an = index for each unique constraint and primary key constraint to enforce = uniqueness. Thus, it is not necessary to create an index explicitly for = primary key columns.

type is better to = use for it? I tried btree and hash, but = didn't

You already have an index on = your bigint primary key. I think it is of type = btree.

Jan
= --Apple-Mail-7-40732653--