Subject Re: [firebird-support] Re: unsuccessful metadata update, key size too big for index
Author Martijn Tonies
Hi,

> > > When I try to create this table, I get the error
> > > "unsuccessful metadata update, key size too big for index"
> >
> > From looking at the above DDL, I can't say that I think the
> > keysize would be too big.
>
> That's what I figured, but the error is there nonetheless.
>
> > What default characterset does this database have?
>
> UNICODE_FSS

Well, that explains a lot. This characterset uses 3 bytes/character.
So you're max VARCHAR length - as a single column in an unique
constraint - would be around 80, 82 or so. It's limited to 255
of 250 bytes (cannot remember exactly).

> > > 1. Break up this table into multiple tables, tie them together
> > > with foreign keys, and enforce uniqueness in each separate table.
> > > A view could be used to bring them together.
> >
> > I have no idea why this should help.
>
> I figured that each table would only have two constraints max.

Oh no, you can have more :-)

Each constraint uses its own auto-created index.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com