Re: 4.1 ten times slower when using utf8 charset
Posted by: Harrison Fisk
Date: March 06, 2005 09:13AM

Hi,

I see that your queries are totally dependant on string comparison time. You still didn't mention what COLLATION you are using for the UTF8 data. The utf8_unicode_ci collation uses contractions so it is quite slow. Try testing with utf8_general_ci or utf8_bin as both of those are much simpler and should be faster (utf8_bin would be the fastest afaik). It will still be slightly slower than latin1, but shouldn't be too much slower. INSTR and LOCATE shouldn't be any slower.

With that said you might be able to still use MySQL to convert to SJIS, even if you have the data stored as latin1. To do so you would have to use CAST to convert to binary, and then into SJIS. I haven't tested it though, so it might not work how I expect. The code would look something like:

CONVERT(CAST(col AS binary) USING sjis)

Hope one of the above helps!

Harrison Fisk, Trainer and Consultant
MySQL AB, www.mysql.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: 4.1 ten times slower when using utf8 charset
4270
March 06, 2005 09:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.