Subject Re: [ib-support] OID: Double or String?
Author Ann W. Harrison
At 04:34 PM 8/28/2002 -0700, Rob Schuff wrote:
>I have done a similar thing but since I do not like compound PKs, I assign a
>certain range to each laptop or site or whatever and use a generator that is
>never incremented.

Compound primary keys are slightly awkward in terms of SQL syntax -
other than that, there's nothing wrong with them. By the time firebird
is done transforming the key values you supply, differences between
compound and simple keys don't matter much at all, except at the outer
limits of the allowed key size.

For retrieval, all that matters is how fast you can go from the top of
the index tree to the bottom level nodes that match your specification.
The more nodes you get in a single read, the faster you go from top to
bottom. So, in general, a shorter key is better than a longer key, but
a longer key that compresses well may turn out to be shorter than a
shorter key that doesn't compress...


We have answers.