Re: Primary Key and Indices - Mailing list pgsql-general

From Ragnar Hafstað
Subject Re: Primary Key and Indices
Date
Msg-id 1114368420.30043.26.camel@localhost.localdomain
Whole thread Raw
In response to Primary Key and Indices  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Primary Key and Indices
List pgsql-general
On Sun, 2005-04-24 at 09:49 -0700, Rich Shepard wrote:
>    I'm converting mysql tables to postgres. One of the tables has this:
>
>    PRIMARY KEY (org_id, contact_id),
>    KEY contact (contact_id, org_id)
>
>    Is there really a difference in the two indices if the sequence of fields
> is reversed?

yes.
for example, only the first one can be used for ORDER BY org_id

gnari



pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: timezone() with timeofday() converts the wrong direction?
Next
From: Antoine Solomon
Date:
Subject: Re: New PostgreSQL book coming