Re: optimizing postgres

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: optimizing postgres
Дата
Msg-id 46972B28.10809@archonet.com
обсуждение исходный текст
Ответ на Re: optimizing postgres  (Zlatko Matić <zlatko.matic1@sb.t-com.hr>)
Список 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 по дате отправления:

Предыдущее
От: Zlatko Matić
Дата:
Сообщение: Re: optimizing postgres
Следующее
От: PFC
Дата:
Сообщение: Re: optimizing postgres