Subject | RE: [ib-support] ato increment / IDENTITY |
---|---|
Author | Ray Drew |
Post date | 2001-06-13T14:23:41Z |
Ann,
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?
I'm sure they do!
Regards
Ray
CIA UK
>At 11:01 AM 6/13/2001 +0100, Ray Drew wrote:using
>>The behaviour of this release is that you _can_ define columns as pk's
>>a smallint or int data type and use generators to populate them. If theSo,
>>generated value exceeds the data type's limit then an error will result.
>>if the genrator produces 32,768 for a column defined as smallint an errorthere
>>will occur. If your pk is never going to reach the data type's limit,
>>is no reason to use 8 bytes to store it, unless you want a bloated andslow
>>database.Thanks for replying. I did not see in the docs that INT64 would vary its
>>
>>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.
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 usinglarge numerics.
I'm sure they do!
Regards
Ray
CIA UK
>Regards,[Non-text portions of this message have been removed]
>Ann
>www.ibphoenix.com
>We have answers.