public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Rich Shepard <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Lookup tables
Date: Tue, 4 Feb 2025 08:18:35 -0700
Message-ID: <CAKFQuwZxDUwyxrcB8Br0XDTUuy_zPi_CNF+sQorGoM=z4Hwndg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CANzqJaC3FeJCSy5EUw9VzunBgG3EK6e9=QzUk9wkF8o1Y5iToA@mail.gmail.com>
<CAKFQuwYpoUxB8je87ozcajt2L7BrNtN9j9mTfomU6gw=jsKNNg@mail.gmail.com>
<[email protected]>
On Tuesday, February 4, 2025, Rich Shepard <[email protected]> wrote:
> On Tue, 4 Feb 2025, David G. Johnston wrote:
>
> The point of a lookup table is to provide a unique list of authoritative
>> values for some purpose. Kinda like an enum. But having the label serve as
>> the unique value is reasonable - we only add surrogates for optimization.
>>
>
> David,
>
> The industrytypes table has 26 rows, the statustypes table has 8 rows. Your
> explanation suggests that for this database adding a PK to each table adds
> little, if anything.
>
It’s the FK side where the cost savings are experienced.
David J.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Lookup tables
In-Reply-To: <CAKFQuwZxDUwyxrcB8Br0XDTUuy_zPi_CNF+sQorGoM=z4Hwndg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox