ข้ามไปยังเนื้อหาหลัก
ProgrammerThailand

บล็อก #mysql #unicode #utf8

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

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

มาดูกันนะครับว่าใน 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

 

เขียนโดย

admin

Software Developer

ความคิดเห็น (0)

ยังไม่มีความคิดเห็น — เริ่มคุยเป็นคนแรก ถามสิ่งที่สงสัย หรือแชร์ประสบการณ์ของคุณ

แชร์

← กลับไปหน้าบล็อก