Search Postgresql Archives

Re: optimizing postgres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux