When to use MyISAM or InnoDB
View Single Post
11-16-2007, 04:21 AM
Join Date: Nov 2007
Location: Mumbai, India
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.
- Follow me on Twitter
View Public Profile
Send a private message to sunilbhatia79
Visit sunilbhatia79's homepage!
Find More Posts by sunilbhatia79