Subject Re: [firebird-support] Max columns in Unique Constraint
Author Scott Moon
Thank you both, Helen and Alexandre - looks like I'm off to rebuild my
database with a larger page size. Are there any particular "gotchas" I need
to be looking out for?

Scott

On 9/4/07, Helen Borrie <helebor@...> wrote:
>
> At 08:52 AM 5/09/2007, you wrote:
> >What is the maximum number of fields that can be included in a unique
> >constraint? Or is the limit based on the length of the included
> >fields?
>
> Yes - it is limited by the maximum total length of the keys
> participating in the unique index that is autocreated to enforce the
> constraint.
>
> >I am using Super Server v2.0.1.
>
> For a database with ODS 11 or higher, depends on page size, character
> set and collation order. The max is in bytes, it is one-quarter of
> page size. Plain ascii with the default collation (binary) gives the
> maximum capacity where character fields are in the keys. Complex
> collation orders and/or MBCS reduce the capacity.
>
> For a database < ODS 11, theoretical max is 252 bytes, less the
> reductions for complex collation orders and/or MBCS.
>
> ./heLen
>
>


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