Forum Moderators: open

Message Too Old, No Replies

#1071 - Specified key was too long; max key length is 1000 bytes

         

dougmcc1

5:47 am on Dec 8, 2006 (gmt 0)

10+ Year Member



I'm using the Sokkit package. When I try adding some additional fields to existing indexes I get the following error message:

"#1071 - Specified key was too long; max key length is 1000 bytes"

What does it mean and how do I fix it?

Thanks.

phranque

10:37 am on Dec 8, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



doug:

your indexes are too long and unnecessarily so.
(basing this on knowlege from your other post.)
there is a comment about the limit (but it's not the actual documentation) at the bottom of this page:
[mysql.org...]

since you only need to index 2 columns that should solve your problem.
should you need to index many columns you can specify limits to how much of each column is indexed.

dougmcc1

4:53 pm on Dec 8, 2006 (gmt 0)

10+ Year Member



That makes sense. I thought I read that including the columns in the index that you want to return in the query was faster so I'm glad I can delete all of my indexes without taking much hit on performance.

Thanks!