473,387 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Aug 11 '06 #1
1 3701
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
Aug 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: James | last post by:
I am currently working on a PHP based website that needs to be able to draw from Oracle, MS SQL Server, MySQL and given time and demand other RDBMS. I took a lot of time and care creating a...
3
by: Michael Loomington | last post by:
Couldn't find anything here http://www.python.org/doc/2.3.2/lib/string-methods.html I need to cycle through lines in a file that contain words and compare it to a string thats given, call it SSS...
6
by: Bill | last post by:
In an effort to improve the speed of queries against my main table, I'll be indexing a column whose data type is varchar(50). Would I be better off (better performance) if I changed the column's...
8
by: dbamota | last post by:
What is the syntax in UDB db2, to create an index IX in table TBL "in tablespace TBSP" which is different from the tablespace of TBL ? TIA
14
by: Luiz Antonio Gomes Pican?o | last post by:
How i can store a variable length data in file ? I want to do it using pure C, without existing databases. I'm thinking to use pages to store data. Anyone has idea for the file format ? I...
6
by: Edward | last post by:
I need to validate a text box entry, but ONLY if it is 17 characters, otherwise I have to ignore it. My regular expression for the validation is: ^(({9})()()(\d{6}))$ Can I adapt this to...
10
by: Dia | last post by:
At the company I work job applicants are required to do a little test. The human resource manager recently had a candidate who claimed one of the questions was ambiguous. Dependent upon the...
0
by: Spacen Jasset | last post by:
I am running postgresql at version 8.1 on a windows xp desktop machine. I then loaded 40 million rows into a table of 6 varchar fields ( The sum total length of a row is on average about 100...
5
by: Les Caudle | last post by:
I've got some C# 2.0 code that has been working for a year. using (XmlWriter w = XmlWriter.Create("out.xml" ,settings)) { // many lines of code to write to w...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.