| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | Zlatko Matić <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> |
| Cc: | lawpoop(at)gmail(dot)com, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: optimizing postgres |
| Date: | 2007-07-13 07:35:04 |
| Message-ID: | 46972B28.10809@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PFC | 2007-07-13 07:54:04 | Re: optimizing postgres |
| Previous Message | Zlatko Matić | 2007-07-13 06:49:47 | Re: optimizing postgres |