Search Postgresql Archives

Re: string primary key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 11, 2006 at 10:43:50 -0600,
  Mark Gibson <mark@xxxxxxxxxxxxxxxxxx> wrote:
> 
> I've got a followup - The primary key for the table in question consists 
> of 2 varchar fields: picture 'state' and 'city' where city is guaranteed 
> to be unique within a state, and (state, city) form a unique key.  This 
> sounds like a good candidate for a sequence key.  Is there a difference 
> in terms of performance in this case?

That might not be such a good idea. I did a quick check of some GNS data
and found what appear to be 4 different cities in Vermont with the same
name. They are in 4 different counties, so it isn't likely that it is
a single city spanning multiple counties.

VT  Mill Village                        ppl        Orange               435738N0721758W Vershire               1014
VT  Mill Village                        ppl        Orleans              443958N0722233W Albany                 1066
VT  Mill Village                        ppl        Essex                442951N0713937W Gilman                 1276
VT  Mill Village                        ppl        Washington           442029N0724454W Middlesex


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux