Index and primary key

From: Gaetan GUYODO <gaetan(dot)guyodo(at)lrb(dot)ap-hop-paris(dot)fr>
To: Pgsql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Index and primary key
Date: 2001-08-06 08:37:52
Message-ID: 01080610375202.01284@uc-102-233
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I have one question :
I have a table, with 12 fields, and 70000 records (not more, that's a
thesaurus)
I will have to make a "select" only on one or two fields.
I have no index on this table.
And primary key is a field containing a five digit number (unique, not null),
which is an important information of the record (I made this field "primary
key" because I'm sure that it will be unique).

Do you think this conception is a good one ?
Maybe, I have to use one of the fields on which I will make a select as
primary key ?
Maybe I have to add an index field ? (if I understand, that's better-faster
to extract a record, but isn't my "primary key" 5 digit code similar ?

Thanks,
Gaetan

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andrew McMillan 2001-08-06 09:12:49 Re: Index and primary key
Previous Message harrold 2001-08-06 00:20:16 Re: nextval/dbi question