Re: Optimizing FK & PK performance...

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Optimizing FK & PK performance...
Дата
Msg-id 3FDFAEA8.1090607@familyhealth.com.au
обсуждение исходный текст
Ответ на Optimizing FK & PK performance...  ("Sean P. Thomas" <spt@ulanji.com>)
Список pgsql-performance
> 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)
> );

No difference - they're parsed to exactly the same thing (the first
version).

> 2. Is DEFERRABLE and INITIALLY IMMEDIATE or INITIALLY DEFERRABLE
> perferred for performance?  We generally have very small transactions
> (web app) but we utilize a model of:

No idea on this one :/

Chris


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

Предыдущее
От: Jenny Zhang
Дата:
Сообщение: Re: [GENERAL] update slows down in pl/pgsql function
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Nested loop performance