Subject | RE: [ib-support] key size too big for index |
---|---|
Author | Leyne, Sean |
Post date | 2003-04-08T20:03:47Z |
> I guess I'm not understanding the size of index keys.What charset are you using for the table/database?
>
> CREATE TableFoo (
> id INTEGER,
> foo VARCHAR(120),
> bar VARCHAR(120) );
>
> CREATE INDEX tableFoo_foo ON TableFoo(foo);
>
>
> This fails telling me that the key size is too big. What
> exactly is the limit for VARCHAR keys?
Index Keys are limited to 252 (or is it 242? -- I can't recall exactly)
*bytes*, which in the case of a three-byte charset would result in
VARCHAR(120) needing 362 bytes!
Sean