Subject Re: [ib-support] index key size
Author Helen Borrie
At 07:16 AM 17/04/2003 +0700, you wrote:
>Dear all,
>
>I asked a question some time in the past (IB 5.x) about the maximum
>allowed size of the PK, which was limited to around 200 characters in
>the default charset. I ran into another similar problem today, this time
>I have a varchar(255) field, and when I try to create a unique index on
>this field, FB complained about 'key size too large'.
>
>1. Is this the same pk/index limitations? Or did I do something wrong?

In fact, the limit with charset NONE is about 252, because a few bytes are
used to store node information.

>2. Is there any workaround/fixes on the issue?

Not until the next ODS change, which will be Firebird 2. Plans are
proceeding to increase index size limits and further optimize the
performance of the index trees.

Horizontally huge indexes aren't very useful from a performance point of
view. Even with the planned increase in index size limits, which will make
it easier when using composite indexes and multi-byte charsets, it's often
better to "tokenize" large character columns by using one or more indexed
short surrogate columns as keywords to the big search.

heLen