| From: | Jacob Jackson <jej(dot)jackson(dot)08(at)gmail(dot)com> |
|---|---|
| To: | Joel Jacobson <joel(at)compiler(dot)org> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Proposal: Add a UNIQUE NOT ENFORCED constraint |
| Date: | 2026-01-08 01:31:44 |
| Message-ID: | CAAiQw3zf2Mzvsi5cd1RA6=ojnq5nyoNyYfE_Gkq-g4LkB_wmTA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Jan 6, 2026 at 1:44 AM Joel Jacobson <joel(at)compiler(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Japin Li | 2026-01-08 01:34:13 | Re: Remove deprecated role membership options from psql help for CREATE USER/GROUP |
| Previous Message | Michael Paquier | 2026-01-08 01:20:32 | Re: Resetting recovery target parameters in pg_createsubscriber |