ns******@gmail.com wrote:
DB2 LUW 8.2
I need to have a combination of varchar columns, whose length is >1100,
as primary key, foreign key and unique index column.
When I try this, I get the error: SQL0613N The primary key or a unique
key identified by "PK_TEST" is too long or has too many columns.
SQLSTATE=54008
Any pointers on how to overcome this?
Thanks
According to the SQL Reference:
http://publib.boulder.ibm.com/infoce...n/r0001029.htm
Longest index key including all overhead (in bytes) 1024
So there is no way to change some sort of configuration.
Depending on what you want to do with the unique constraint, you could
reconsider your design. An artificial key is often chosen because it is
shorter and result in smaller index trees with a larger fan-out, implying
faster searches. If you can't do away with your long key at all, use an
artificial key and stick to triggers to ensure uniqueness of your longer
keys.
Or you can move to version 9, which sets the limit at 8K for a single key.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany