มาดูว่า utf8_general_ci กับ utf8_unicode_ci ต่างกันอย่างไร

wave

มาดูว่า utf8_general_ci กับ utf8_unicode_ci ต่างกันอย่างไร

มานพ กองอุ่น 1 ต.ค. 2014 21:27:50 8,171

มาดูกันนะครับว่าใน mysql นั้นเราควรที่จะตั้งค่าการเข้ารหัสอักขระเป็น utf8_unicode_ci หรือ utf8_general_ci ไปดูกันเลยนะครับ โดยเอาผลการทดสอบมาแปะเลยดีกว่าครับ

benchmark_simple_select() with utf8_general_ci: 9957 ms
benchmark_simple_select() with utf8_unicode_ci: 10271 ms
In this benchmark using utf8_unicode_ci is slower than utf8_general_ci by 3.2%.

benchmark_select_like() with utf8_general_ci: 11441 ms
benchmark_select_like() with utf8_unicode_ci: 12811 ms
In this benchmark using utf8_unicode_ci is slower than utf8_general_ci by 12%.

benchmark_order_by() with utf8_general_ci: 11944 ms
benchmark_order_by() with utf8_unicode_ci: 12887 ms
In this benchmark using utf8_unicode_ci is slower than utf8_general_ci by 7.9%.

ดูรายละเอียดเพิ่มเติมได้ที่นี่ครับ http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci

 

ความคิดเห็น