Re: Creating indexes

From: Asche <asche(dot)public(at)mac(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Creating indexes
Date: 2008-05-08 19:49:26
Message-ID: 8A21EAB9-9D04-480F-A952-4294178F4374@mac.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alan Hodgson 2008-05-08 19:52:30 Re: Creating indexes
Previous Message Rauan Maemirov 2008-05-08 19:00:39 Creating indexes