View Single Post
Old 11-16-2007, 04:21 AM   #4 (permalink)
sunilbhatia79
The Wanderer
 
Join Date: Nov 2007
Location: Mumbai, India
Posts: 24
Thanks: 0
sunilbhatia79 is on a distinguished road
Default

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.
__________________
Sunil Bhatia www.twitter.com/sunilbhatia79 - Follow me on Twitter
PHP5 Tutorials
Career Articles
sunilbhatia79 is offline  
Reply With Quote