Subject RE: [ib-support] key size too big for index
Author Robert DiFalco
Wow, that's pretty restrictive. Well, our application has to run in
multiple locales so we use UNICODE. Oddly enough, it seems like it uses
a UTF8 encoding and there is no option for a 2 byte UNICODE encoding. Is
this the case with other databases like DB2 and Oracle, that keys need
to be less than 252 bytes?

R.

-----Original Message-----
From: Leyne, Sean [mailto:sleyne@...]
Sent: Tuesday, April 08, 2003 1:04 PM
To: ib-support@yahoogroups.com
Subject: RE: [ib-support] key size too big for index


> I guess I'm not understanding the size of index keys.
>
> 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?

What charset are you using for the table/database?

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


Yahoo! Groups Sponsor
ADVERTISEMENT

<http://rd.yahoo.com/M=246920.2960106.4328965.1728375/D=egroupweb/S=1705
115386:HM/A=1513703/R=0/*http://www.gotomypc.com/u/tr/yh/cpm/grp/300_06F
/g22lp?Target=mm/g22lp.tmpl>

<http://us.adserver.yahoo.com/l?M=246920.2960106.4328965.1728375/D=egrou
pmail/S=:HM/A=1513703/rand=122547486>

To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]