12-04-2007, 08:32 PM
|
#10 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Quote:
Originally Posted by sunilbhatia79
Additionally, MyISAM only supports an index length of 500 characters per record.
This means that (assuming) if you have three cols as varchar(255) and you index all three fields, then the result will be an index of 255*3 = 765 (works well with InnoDB), but with MyISAM this would give you an error stating that the key length per record cannot exceed 500.
The solution to which is that you will have to create a partial composite index like alter table add index <indexname>(col1(100), col2(100), col3(100))
The 100 above is the length of each col that should be indexed.
Let me know if someone needs more info on this.
|
That sounds rather complex to me! But I think I understand. You're saying reduce each index to 100 so that you can effectively have 5 indexes of 100 in length?
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|