Re: Primary Key Increment Doesn't Seem Correct Under Table Partition

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Yan Cheng Cheok <yccheok(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Primary Key Increment Doesn't Seem Correct Under Table Partition
Date: 2010-01-29 12:21:58
Message-ID: 1A8B962F-258F-41CE-837E-42FB9423F009@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 29 Jan 2010, at 1:56, Yan Cheng Cheok wrote:

> Isn't the primary constraint will implicitly create an index for day already?
>
> PRIMARY KEY (advertiser_id, day),

Yes, but it's not a very efficient index to look for values of day if you don't provide a value for advertiser_id as well. See http://www.postgresql.org/docs/8.4/interactive/indexes-multicolumn.html

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.

!DSPAM:737,4b62d2e810751877882363!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2010-01-29 12:52:19 Re: How to generate unique hash-type id?
Previous Message Wappler, Robert 2010-01-29 12:13:17 Re: How to generate unique hash-type id?