Re: Creating indexes

From: Rauan Maemirov <rauan1987(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Creating indexes
Date: 2008-05-09 05:41:22
Message-ID: e031afc7-ac39-4e20-a6f1-50975af8f01d@8g2000hse.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On May 9, 1:49 am, asche(dot)pub(dot)(dot)(dot)(at)mac(dot)com (Asche) wrote:
> 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

Aah, I understand. Thanks to all for detailed response.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Antoine Baudoux 2008-05-09 07:18:39 Re: multiple joins + Order by + LIMIT query performance issue
Previous Message PFC 2008-05-08 20:08:17 Re: Creating indexes