Some databases have a maximum byte limit for the row length. Because
each property that you create becomes a table column, you can exceed
the row size limitation and receive an error when adding more property
definitions to a class.
For row size limits for supported database engines, see
Database Engine Differences.
For databases that have a maximum row size limit, users and application
designers must take care to limit the number and size of the properties
that are assigned to a class. The following suggestions can help you
to avoid exceeding the row size limit.
- Allocate as little space as possible for the initial size of a
string property. The size can be increased later. For production object
stores, contact your IBM® support
representative for information about reducing string column sizes.
- Consider the data type used for a string property because it can
affect the row size. A string property with a large allocation size
takes far less space in the row if it is created as a long string
data type; however, long strings have functional limitations. Using
an integer for representing values takes less space compared to a
string. For more information about the differences between short and long string data types,
see "Short or long custom string properties" in Selected
property descriptions.
- Reduce the number of custom properties to a minimum number. Assigning
properties to a class increases the row size.
- Eliminate unnecessary add-on features. Add-on features contain
properties that increase the row size.
To calculate row size for existing DB2® tables, see Determine database row
size.
If the maximum row size limit is exceeded,
you can take the following steps:
- For DB2 for Linux, UNIX and Windows V10.1
or earlier, upgrade to DB2 for Linux, UNIX and Windows V10.5
or later. For more information, see Planning for DB2 for Linux, UNIX and Windows database upgrades.For DB2 for Linux, UNIX and Windows V10.1 or earlier and DB2 for z/OS®, enable overflow table
support by enabling the Support table overflow (TableOverflowEnabled)
option for the object store. When this option is enabled, an overflow
table is created when an object store database table exceeds the 32
KB row-size limit. Enabling table overflow support can slightly degrade
database performance.