Re: optimizing postgres - Mailing list pgsql-general

From Richard Huxton
Subject Re: optimizing postgres
Date
Msg-id 46972B28.10809@archonet.com
Whole thread Raw
In response to Re: optimizing postgres  (Zlatko Matić <zlatko.matic1@sb.t-com.hr>)
List pgsql-general
Zlatko Matić wrote:
> Hello, Tom.
> I don't understand relation between constraints and indexes.
> By using EMS PostgreSQL Manager Lite, I created indexes on columns, some
> of them are unique values.
> But when I open it in PgAdmin, all such "unique" indexes are listed as
> constraints and there are no  indexes in Indexes section. When I open it
> again in EMS PostgreSQL Manager, they are listed as "Indexes".
> Does it mean that I need to create additional indexes on the same columns?
> Is "Constrain" index as well?

The default tool is "psql", the command-line client. If in doubt, refer
to that (and the manuals).

In this case, a quick look at the manuals cover it:
   http://www.postgresql.org/docs/8.2/static/indexes-unique.html
"PostgreSQL automatically creates a unique index when a unique
constraint or a primary key is defined for a table. The index covers the
columns that make up the primary key or unique columns (a multicolumn
index, if appropriate), and is the mechanism that enforces the constraint."

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Zlatko Matić
Date:
Subject: Re: optimizing postgres
Next
From: PFC
Date:
Subject: Re: optimizing postgres