Subject Re: [firebird-support] Weird... "keysize too big for index"
Author David Johnson
I'll give it a go when I have a chance.

The 25x byte count limit is a function of the engine, though. SQL, per
se, does not define a limit (although Firebird SQL may enforce one).

VARCHAR(1) is 1 to 2 bytes. One byte for the length, and 1 byte for the
(optional) data.

Try with CHAR(x) instead of VARCHAR(x).


On Tue, 2005-03-15 at 05:24, Ivan Prenosil wrote:
>
>
> >From: "David Johnson"
> >
> > Are you sure that you haven't been snagged by the one-off count? Since
> > the engine is written in C, byte offsets are computed from a 0 base. i
> > [252] is the 253rd byte.
>
> VARCHAR(1) can hold 1 character, not two. Have you tried it ?
> The language used for the engine is irrelevant, because we talk
> about sql layer.
>
> Ivan
>
> >
> > On Tue, 2005-03-15 at 02:36, Ivan Prenosil wrote:
> >>
> >>
> >> > An index is limited to a maximum width of 253 characters adding all the
> >> > field widths in specified in the index
> >>
> >> I wonder why everybody say the limit is 253, when it is
> >> in fact 252 (try it yourself).
> >>
> >> To verify keysize, you can play with this Index key size calculator:
> >> http://www.volny.cz/iprenosil/interbase/ip_ib_indexcalculator.htm
> >>
> >> Ivan
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>