From: | Alex Satrapa <alex(at)lintelsys(dot)com(dot)au> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Drawbacks of using BYTEA for PK? |
Date: | 2004-01-13 22:25:50 |
Message-ID: | 4004706E.4020405@lintelsys.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
David Garamond wrote:
> Remember that /sbin/ifconfig output usually include MAC address too. Not
> that MAC addresses are 100% unique, but that should increase the
> uniqueness.
How do you increase uniqueness? Either a value is unique or it isn't -
if you've got multiple hosts on the network with the same network
address, you're in big trouble!
32 bits for an IP address is a huge number space... but why you'd really
need that much space as a base for your GUID is beyond me. The "host"
part of the address (eg: the last 8 bits in a /24 network block) would
be enough to uniquely identify the 254 hosts on your network. Then add a
32 bit timestamp, and you have 24 bits left for uniquely identifying
things that are created within the same second on the same server -
that's 16M things per second. Busy little shop you'd be running to
exhaust that unique space ;)
Adding extra number space doesn't increase the uniqueness of any
particular key - you have to know how little you can get away with to be
unique. Like distinguishing two humans from each other - you don't need
to unravel the DNA to 3,000 base pairs (3k bits!) if you can settle for
"blonde" versus "auburn" (1 bit!).
I can't remember who said it, but there's a nice quote that's relevant
in this situation: "The true mark of a well designed system is not that
there's nothing left to add, it's that there's nothing left to take away!"
Regards
Alex Satrapa
From | Date | Subject | |
---|---|---|---|
Next Message | Rick Gigger | 2004-01-13 22:42:29 | Re: serverless postgresql |
Previous Message | Enrico Weigelt | 2004-01-13 22:17:13 | Re: serverless postgresql |