Subject | Re: [firebird-support] Re: unsuccessful metadata update key size too big for index RDB$6 |
---|---|
Author | Helen Borrie |
Post date | 2003-10-20T00:53:50Z |
At 12:43 AM 20/10/2003 +0000, you wrote:
A key is not an index, but creating a key creates a mandatory index. The
UNIQUE constraint is a key constraint.
Multiple-column indexes use up more bytes than the total byte count of the
individual columns.
Multi-byte character sets use 2 or 3 times the number of bytes that 1-byte
character sets do (depends on byte-size of the character set).
Non-binary collations eat more bytes after that.
heLen
>--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>To be clear, no index can exceed 253 bytes.
>wrote:
> > At 09:00 PM 17/10/2003 +0000, you wrote:
> > >Any idea why I get the error (above) when I try to create the table
> > >below?
> > >
> > >CREATE TABLE jobhistory (jobnum INTEGER not null,
> >
> > >id VARCHAR(255) not null UNIQUE,
> >
> > this is your problem. A UNIQUE constraint creates an index. Index
>width
> > is limited to 253 bytes, less if you are using a non-binary
>collation,
> > composite fields or a multi-byte character set.
> >
>
>hi heLen,
>
>does it means that if we are going to create an index key, the
>combination field of the index must not > 253 bytes ?
A key is not an index, but creating a key creates a mandatory index. The
UNIQUE constraint is a key constraint.
Multiple-column indexes use up more bytes than the total byte count of the
individual columns.
Multi-byte character sets use 2 or 3 times the number of bytes that 1-byte
character sets do (depends on byte-size of the character set).
Non-binary collations eat more bytes after that.
heLen