Re: UNIQUE constraint and indexing

Поиск
Список
Период
Сортировка
От Arcady Genkin
Тема Re: UNIQUE constraint and indexing
Дата
Msg-id r1zr8snl8qp.fsf@bashful.cdf.toronto.edu
обсуждение исходный текст
Ответ на Re: UNIQUE constraint and indexing  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: UNIQUE constraint and indexing
Список pgsql-general
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:

> On 27 Sep 2001, Arcady Genkin wrote:
>
> > Is the index, created implicitely by "UNIQUE" constraint, the same
> > kind as created explicitely with "CREATE INDEX"?  In other words,
> > is the following piece of SQL redundant?
> >
> > create table foo (
> >        bar serial primary key,
> >        baz text not null unique );
> > create index foo_baz_idx on foo(baz);
>
> Apart from the index for unique being a unique index, I believe so.

So, the unique index will still be used when processing SELECT
queries, right?  In other words, is the index foo_baz_idx redundant?

THanks,
--
Arcady Genkin

В списке pgsql-general по дате отправления:

Предыдущее
От: "Tille, Andreas"
Дата:
Сообщение: Re: Performance question (stripped down the problem)
Следующее
От: Keary Suska
Дата:
Сообщение: Re: Perl connection to Postgres?