Re: [GENERAL] difference in INDEX's

Поиск
Список
Период
Сортировка
От Goran Thyni
Тема Re: [GENERAL] difference in INDEX's
Дата
Msg-id 35A0B7B3.EF8FEE7A@bildbasen.se
обсуждение исходный текст
Ответ на difference in INDEX's  (Brian <signal@shreve.net>)
Список pgsql-general
Brian wrote:
> Is there a difference in doing:
>
> foo             int PRIMARY KEY
>
> and
>
> CREATE INDEX idx1 on table (foo);

Yes,

create table bar (foo int PRIMARY KEY);

is the same as

create table bar (foo int NOT NULL); CREATE UNIQUE INDEX bar_pkey on
table bar(foo);

The first is easier to type,
the second is preferable (faster) if you will initially do a lot of
inserts, like:

create table...
loads of inserts...
create unique index...

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

Предыдущее
От: "Oliver Elphick"
Дата:
Сообщение: Re: [GENERAL] :) Import file2table Question
Следующее
От: Stuart Rison
Дата:
Сообщение: [GENERAL] nodeRead ERROR.