Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 11th, 2006, 07:05 AM
nshishir@gmail.com
Guest
 
Posts: n/a
Default Index/Key length > 1100 chars

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

  #2  
Old August 11th, 2006, 08:25 AM
Knut Stolze
Guest
 
Posts: n/a
Default Re: Index/Key length > 1100 chars

nshishir@gmail.com wrote:
Quote:
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
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles