[development] MySQL: joins on CHAR columns slower than INT

Khalid Baheyeldin kb at 2bits.com
Tue Jun 19 02:36:22 UTC 2007


Examples:

InnoDB : 50% slower.
MyISAM: 6X slower.

Conclusions:

   1. CHAR keys are indeed slower for joins compared to integer keys
   2. Performance degradation can range from few percent to couple of
   times for Innodb tables
   3. MyISAM Tables may suffer significantly if key compression is not
   disabled
   4. Joining on Shorter CHAR keys is significantly faster than Long keys

   5. Latin1 (I guess any simple encoding) is significantly faster for
   joins compared to UTF8

Details here

http://www.mysqlperformanceblog.com/2007/06/18/using-char-keys-for-joins-how-much-is-the-overhead/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070618/7c8eea34/attachment.htm 


More information about the development mailing list