This is a discussion on how can I increase the max key length? within the MySQL forums, part of the Database Server Software category; --> Hi, if I try to install mediawiki, I get following mysql-error, during running config/index.php: "Specified key was too long; ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, if I try to install mediawiki, I get following mysql-error, during running config/index.php: "Specified key was too long; max key length is 1000 bytes". How can I allow keys longer than 1000 bytes? I use mysql-4.1.14 from gentoo-portage. Best regards Sebastian Noack |
| |||
| Sebastian Noack wrote: > Hi, > > if I try to install mediawiki, I get following mysql-error, during running > config/index.php: "Specified key was too long; max key length is 1000 > bytes". How can I allow keys longer than 1000 bytes? I use mysql-4.1.14 > from gentoo-portage. Use the source, Luke. Although I'd discourage using keys that long - what's the point? If you need a key that is longer than 1000 bytes, it takes a lot of time to figure out if a key matches a condition. If the keys are substrings of blobs, there is not much point to it anyway. Unless you are storing text, in which case a fulltext index would be appropriate. |
| |||
| > Although I'd discourage using keys that long - what's the point? If you > need a key that is longer than 1000 bytes, it takes a lot of time to > figure out if a key matches a condition. If the keys are substrings of > blobs, there is not much point to it anyway. Unless you are storing > text, in which case a fulltext index would be appropriate. Like I said, I only try to install mediawiki. But I have find out that the following SQL-Query occurs the error: CREATE TABLE categorylinks ( cl_from int(8) unsigned NOT NULL default '0', cl_to varchar(255) binary NOT NULL default '', cl_sortkey varchar(255) binary NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE KEY cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey(128)), KEY cl_timestamp(cl_to,cl_timestamp) ) But because I don't have designed the db-structure by my own, I would prefer to don't alter it. So I ask again, is there a way to increase the max length for keys? Best regards Sebastian Noack |
| ||||
| Sebastian Noack wrote: >>Although I'd discourage using keys that long - what's the point? If you >>need a key that is longer than 1000 bytes, it takes a lot of time to >>figure out if a key matches a condition. If the keys are substrings of >>blobs, there is not much point to it anyway. Unless you are storing >>text, in which case a fulltext index would be appropriate. > > > Like I said, I only try to install mediawiki. But I have find out that the > following SQL-Query occurs the error: > > CREATE TABLE categorylinks ( cl_from int(8) unsigned NOT NULL default '0', > cl_to varchar(255) binary NOT NULL default '', cl_sortkey varchar(255) > binary NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE KEY > cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey(128)), KEY > cl_timestamp(cl_to,cl_timestamp) ) > > But because I don't have designed the db-structure by my own, I would > prefer to don't alter it. So I ask again, is there a way to increase the > max length for keys? Do you notice *any* key in this query that's longer than 255+128 = 383 bytes? I don't, but then I'm myopic. Maybe you could post the exact error message? |