Subject | Re: [firebird-support] Problem with index |
---|---|
Author | Helen Borrie |
Post date | 2008-09-24T23:28:23Z |
At 05:13 25/09/2008, you wrote:
How do I know your key size? visit http://www.volny.cz/iprenosil/interbase/ip_ib_indexcalculator.htm
./heLen
>I have a table with columns and constraintIt's not a matter of just adding up the widths and comparing them with the limit. Composite indices take up more "width", as do multi-byte charsets and collations. In your example the total key size is 2700 bytes, so you need to adjust the widths of those varchars if you want a unique constraint on them with an 8K page size.
>
>x varchar(250)
>y varchar(250)
>z varchar(40)
>UNIQUE (x, y, z)
>
>The charset is UTF8, so the key length is (250+250+40)*3 = 1620
>
>With a page size of 16384, no problem. With a page size of 8192, I
>get the following error:
>
>key size exceeds implementation restriction for index "RDB$3"
>
>RDB$3 is the (x, y, z) constraint. According to the release notes
>(Firebird_v2.0.3.ReleaseNotes.pdf), the maximum key size should be 1/4
>the page size. For 8192, this would be 2048. What am I missing?
How do I know your key size? visit http://www.volny.cz/iprenosil/interbase/ip_ib_indexcalculator.htm
./heLen