Re: Primary keys and composite unique keys(basic question)

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Primary keys and composite unique keys(basic question)
Дата
Msg-id 69a5b7b83689ab456dd4b3cd7eb08e9573652039.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Primary keys and composite unique keys(basic question)  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Primary keys and composite unique keys(basic question)  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
On Thu, 2021-04-01 at 21:28 -0500, Merlin Moncure wrote:
> I would never use UUIDS for keys though.

That makes me curious for your reasons.

I see the following disadvantages:

- A UUID requires twice as much storage space as a bigint.

- B-tree indexes are space optimized for inserting at the
  rightmost leaf page, but UUIDs are random.

- UUIDs are more expensive to generate.

On the other hand, many processes trying to insert into
the same index page might lead to contention.

Is there anything I have missed?

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: Jehan-Guillaume de Rorthais
Дата:
Сообщение: Re: questions about wraparound
Следующее
От: Joao Miguel Ferreira
Дата:
Сообщение: pass non-formated query to PL function