Subject Re: [ib-support] Key size and plan
Author Ivan Prenosil
> I get quite a strange error message with Firebird 1.0 when creating a
> database:
>
> unsuccessful metadata update
> key size exceeds implementation restriction for index
> "Person_PersName_Idx"
> index Entry_Actor_Idx cannot be used in the specified plan.
>
> Some background:
>
> Table Person
> (PersonID Numeric(18,0) = Primary Key,
> PersName VarChar(70) collate DE_DE (with ISO8859_1),
> ....)
>
> Person_PersName_Idx = Index(PersName, PersonID)
>
> index Entry_Actor_Idx = Numeric(18), Date, Numeric(18) of a table Entry.
>
> I use this index in a plan of a stored procedure - but this stored
> procedure is not related to table person nor Person_PersName_Idx.
>
> The error occured when I extended PersName from 60 to 70.
>
> Has anyone a clue what the cause about this error? I know of the
> limitation for indexes of 255 characters but as I can see that
> shoudn't be a problem for the situation above.

Max size of index key depends on several things.
If you use non-binary collation (DE_DE), the key can be only 84 characters long (instead of 252).
If you use compound index consisting of int64 and varchar with collation,
varchar is then limited to only 62 characters !


Ivan
http://www.volny.cz/iprenosil/interbase