Index - max key length is 1024 bytes
What are the pros and cons in resizing the MAX index size, from 1024. - javabuddy People are conversing... without posting their email or filling up their mail box. ~~1123957730975~~ roomity.com http://roomity.com/launch.jsp No sign up to read or search this Rich Internet App -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Index - max key length is 1024 bytes
I am trying to create an index with multiple fields. The sixe of each of the column is listed and thier sum is 560bytes. But when I try to create an index with the colums, it complains on the size exceeded 1024 bytes. Below is the query and the size of each.. create index selectTechnologyClubsThread_idx on content (club_id, date_update, subject, message_id, id, date_published, comment_count_d, display_usr_name_d, short_content) COLUMN_NAME TYPESIZE club_id Bigint 8 date_update Bigint 8 Subject Varchar(120)121 message_id varchar(120)121 Id Bigint 8 date_published Datetime8 comment_count_d Int 4 short_content Varchar(250)251 display_usr_name_d Varchar(30) 31 TOTAL : 560 Any sort of help would be great - javabuddy People are conversing... without posting their email or filling up their mail box. ~~1123867827435~~ roomity.com http://roomity.com/launch.jsp No sign up to read or search this Rich Internet App -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Index - max key length is 1024 bytes
If you are on a version prior to 4.1.2 the max index size is 500 bytes {not sure why the error mentions 1024} From section 14.1 of documention The maximum key length is 1000 bytes (500 before MySQL 4.1.2). This can be changed by recompiling. For the case of a key longer than 250 bytes, a larger key block size than the default of 1024 bytes is used. -Original Message- From: javabuddy [mailto:[EMAIL PROTECTED] Sent: Friday, August 12, 2005 12:30 PM To: mysql@lists.mysql.com Subject: Index - max key length is 1024 bytes I am trying to create an index with multiple fields. The sixe of each of the column is listed and thier sum is 560bytes. But when I try to create an index with the colums, it complains on the size exceeded 1024 bytes. Below is the query and the size of each.. create index selectTechnologyClubsThread_idx on content (club_id, date_update, subject, message_id, id, date_published, comment_count_d, display_usr_name_d, short_content) COLUMN_NAME TYPESIZE club_id Bigint 8 date_update Bigint 8 Subject Varchar(120)121 message_id varchar(120)121 Id Bigint 8 date_published Datetime8 comment_count_d Int 4 short_content Varchar(250)251 display_usr_name_d Varchar(30) 31 TOTAL : 560 Any sort of help would be great - javabuddy People are conversing... without posting their email or filling up their mail box. ~~1123867827435~~ roomity.com http://roomity.com/launch.jsp No sign up to read or search this Rich Internet App -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Index - max key length is 1024 bytes
Thanks But still I can't get the part where my column size totals to 560, but MySql complaining that I have exceeded 1024. Did I went anywhere wrong??? - Gana. People are conversing... without posting their email or filling up their mail box. ~~1123871242499~~ roomity.com http://roomity.com/launch.jsp No sign up to read or search this Rich Internet App -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Index - max key length is 1024 bytes
javabuddy wrote: Thanks But still I can't get the part where my column size totals to 560, but MySql complaining that I have exceeded 1024. Did I went anywhere wrong??? - Gana. People are conversing... without posting their email or filling up their mail box. ~~1123871242499~~ roomity.com http://roomity.com/launch.jsp No sign up to read or search this Rich Internet App What character set are you using? The default (latin1) is 1 byte per char, but some different character sets are 2 or 3 bytes per char (for example, unicode / UTF8 is 3 bytes). I can't find where this is documented in the manual, but it is discussed slightly here: http://dev.mysql.com/doc/mysql/en/char.html http://dev.mysql.com/doc/mysql/en/charset-unicode.html HTH, Devananda vdv -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Index - max key length is 1024 bytes
javabuddy wrote: But still I can't get the part where my column size totals to 560, but MySql complaining that I have exceeded 1024. Did I went anywhere wrong??? Are you sure you've thought your index through correctly and considered how MySQL will use it? What sort of query would such an index be useful for? In most circumstance it makes little sense to index more than a prefix of a long VARCHAR or TEXT field, and indexing nine fields at once will only make sense if you use all nine in your query. Maybe you want a FULLTEXT index? -- Keith Ivey [EMAIL PROTECTED] Smokefree DC http://www.smokefreedc.org Washington, DC -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Index - max key length is 1024 bytes
Thanks Devananda.. it helped. - javabuddy. People are conversing... without posting their email or filling up their mail box. ~~1123878070408~~ roomity.com http://roomity.com/launch.jsp No sign up to read or search this Rich Internet App -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]