Subject RE: [ib-support] ato increment / IDENTITY
Author Ray Drew
Ann,

>At 11:01 AM 6/13/2001 +0100, Ray Drew wrote:

>>The behaviour of this release is that you _can_ define columns as pk's
using
>>a smallint or int data type and use generators to populate them. If the
>>generated value exceeds the data type's limit then an error will result.
So,
>>if the genrator produces 32,768 for a column defined as smallint an error
>>will occur. If your pk is never going to reach the data type's limit,
there
>>is no reason to use 8 bytes to store it, unless you want a bloated and
slow
>>database.
>>
>>Am I missing something?

>Well, bloat is perhaps a bit strong. An INT64 holding a value less than
>65576 takes only four bytes because of compression.

Thanks for replying. I did not see in the docs that INT64 would vary its
storage requirements. In that case you may as well have the extra
flexibility and define pk's as INT64s. Will an INT64 compress a value of
32767 to 2 bytes? Or 255 to 1 byte?

>The datatype of a numeric value has no effect on indexing.

So there's no performance benefit in using smaller keys?

>People waste a great deal more space by improper normalization than using
large numerics.

I'm sure they do!

Regards

Ray
CIA UK

>Regards,

>Ann
>www.ibphoenix.com
>We have answers.




[Non-text portions of this message have been removed]