Re: Optimizing FK & PK performance...

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Optimizing FK & PK performance...
Дата
Msg-id 87fzfkl6qo.fsf@mailbox.samurai.com
обсуждение исходный текст
Ответ на Optimizing FK & PK performance...  ("Sean P. Thomas" <spt@ulanji.com>)
Список pgsql-performance
"Sean P. Thomas" <spt@ulanji.com> writes:
> 1. Is there any performance difference for declaring a primary or
> foreign key a column or table contraint?  From the documentation,
> which way is faster and/or scales better:
>
> CREATE TABLE distributors (
>       did     integer,
>       name    varchar(40),
>       PRIMARY KEY(did)
> );
>
> CREATE TABLE distributors (
>       did     integer PRIMARY KEY,
>       name    varchar(40)
> );

These are equivalent -- the performance should be the same.

-Neil


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Excessive rows/tuples seriously degrading query
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Why is VACUUM ANALYZE so slow?