Re: Proposal: Add a UNIQUE NOT ENFORCED constraint

Поиск
Список
Период
Сортировка
От Jacob Jackson
Тема Re: Proposal: Add a UNIQUE NOT ENFORCED constraint
Дата
Msg-id CAAiQw3zf2Mzvsi5cd1RA6=ojnq5nyoNyYfE_Gkq-g4LkB_wmTA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal: Add a UNIQUE NOT ENFORCED constraint  ("Joel Jacobson" <joel@compiler.org>)
Список pgsql-hackers
On Tue, Jan 6, 2026 at 1:44 AM Joel Jacobson <joel@compiler.org> wrote:
> Can you please share some more details on your use-case?
> I'm curious to learn more about this "unique" column.
> Don't you ever need to do lookups/joins on it (e.g. WHERE col = ?)

The unique column (technically 2 columns that combined are unique)
functions as a pretty typical id. Yes, I do run joins on it, but the
performance advantage of an additional index is outweighed by the
ingest performance hit due to the cardinality of the outer relation
(hash joins are typically used) and the relatively small row size.



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