Re: n00b question re: indexes and constraints

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: n00b question re: indexes and constraints
Date: 2020-04-22 18:30:47
Message-ID: CAKFQuwZu9+VpqMFDYuxLs8sjTPj5wOWR+it8Pug4VPbMv7riBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Apr 22, 2020 at 11:26 AM Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
wrote:

> Are constraints also indexes, or would you want an additional index on top
> of a constraint if you wanted that column/combo indexed?
>

No, having a constraint does not imply that an index exists. However, the
enforcement of a "unique" constraint is implemented by auto-creating a
unique index.

David J.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2020-04-22 18:39:33 Re: n00b question re: indexes and constraints
Previous Message Wells Oliver 2020-04-22 18:25:22 n00b question re: indexes and constraints