Using indexes and keys

From: John Taylor <postgres(at)jtresponse(dot)co(dot)uk>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Using indexes and keys
Date: 2002-02-08 16:50:42
Message-ID: 02020816504200.05502@splash.hq.jtresponse.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


I'm a bit confused about the use of indexes with postgresql.
I've a number of questions that are probably obvious when you know
the answer, but I can't find in the documentation.

1) It seems that I can only have primary keys in postgresql,
does this mean that keys are not the same as indexes ?

2) If I define a column as a primary key, does that mean that it will be
indexed, so I don't nee to create an index as well ?

2a) If so - If I define two or more columns as the primary key, will they
be indexed seperately, or do I need to index the 2nd and 3rd columns
seperately

3) If I create an index on a column (it is not unique and so can't be a key),
what do I need to query on - the index name or the column name ?

Thanks
JohnT

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2002-02-08 17:49:34 Re: Using indexes and keys
Previous Message Joshua b. Jore 2002-02-08 14:23:52 Re: SETOF / SETS_FIXED?