Subject RE: [IB-Conversions] Re: Key size too long (from Oracle to Interbase)
Author Claudio Valderrama C.
> -----Original Message-----
> From: Bruno Mattarollo [mailto:bruno@...]
> Sent: Jueves 17 de Agosto de 2000 3:40
> To: IB-Conversions@egroups.com
>
> Thanks to Claudio and Helen for their reply ... Hmmm ... I don't like
> very much to have a limit of 255 bytes on the length of my keys ...
> What am I suppose to do if I need to have and combined index for a
> two or three fields that are varchar(100) each ? Change my design and
> screw up my code? It's not very good don't you think? Anyway, this is
> just the voice of my frustration ... grrr...Thanks again for the
> answers.

There are two problems:
- First, a design limitation in Interbase that comes from the time it was
created (around 1985). Fifteen years after (now), saving the last byte in
disk is not as important. You also have the luxury of putting more
structures in RAM. Interbase was thought to run on machines that now would
be a joke, hence the small footprint it has. The indexes use a byte to store
the length of the field, and one byte at most gives you 255. The practical
limit is 252 for one field and less for two fields combined.
- Second, using super strings as primary keys never has been wise. It's like
using your full name instead of your social security number (in the US) or
an unique identification per person (in other countries).

C.