Subject Re: [firebird-support] Err -663 "Too many keys defined for index" while trying to create single field index on table with 4 records..
Author Lester Caine
Ann W. Harrison wrote:

> Ann W. Harrison wrote:
>>For what it's worth, the database has some abandoned records in
>>RDB$INDEX_SEGMENTS. I'm trying to figure out how they got there and why
>>they don't show up when you look for them.
> Well, I found it. Nasty interaction between the system transaction and
> a rolled back user transaction.

I've just hit the same problem!
Database with a table with a single Index on the ID. I wanted to add a
UNIQUE index on four fields but it failed. Two fields worked fine.
After a backup and restore then the four field index created without the
The one thing that was a problem was a duplicate record which I had
deleted before getting the 'Too many keys' error. Could it be that the
deleted records are causing a problem until they are removed?

Lester Caine
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.