Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
utf8mb4_0900_bin
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
とみたまさひろ
August 19, 2019
Technology
2.9k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
utf8mb4_0900_bin
とみたまさひろ
August 19, 2019
More Decks by とみたまさひろ
See All by とみたまさひろ
MySQLとPostgreSQLのコレーション / Collation of MySQL and PostgreSQL
tmtms
1
1.9k
文字列の並び順 / Unicode Collation
tmtms
4
1.2k
夢の印税生活 / Life on Royalties
tmtms
0
660
文字列の並び順 / String Collation
tmtms
1
270
日本MySQLユーザ会ができるまで / making MyNA
tmtms
1
1.1k
Ruby on Browser - RubyWorld Conference 2024
tmtms
1
1.7k
Ruby on Browser
tmtms
1
2.4k
私のRSpecの書き方 / How I write RSpec
tmtms
5
2.3k
ショートカットと端末 / shortcut & terminal
tmtms
2
1.1k
Other Decks in Technology
See All in Technology
ブラウザアプリの継続的パフォーマンスモニタリング (序) / Continuous Browser Application Performance Monitoring; Act 1
moznion
0
110
Microsoft 365 Copilot chat -tekoälypalvelun tietosuojaongelmat
hponka
0
460
module Synths; end
asonas
1
120
【Oracle AI Spotlight ウェビナー】AWSか、Azureか、Google Cloudか。その議論にオラクルを含める意義。
oracle4engineer
PRO
2
240
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
0
410
AI時代におけるプロダクト横断勉強会の設計
zozotech
PRO
0
160
Sony-DroidKaigi2026
sony
1
320
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
0
190
2026-09-04 SRE Tech Talk #15 怠惰なTerraform / Lazy Terraform
masasuzu
0
210
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
1
320
その指示、Bobにしっかり伝わってる?初心者でも即実践できる プロンプト/コンテキスト設計のコツ
muehara
1
200
bet_ai_day_2026_session02
agenticsec
1
1.3k
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
310
Fireside Chat
paigeccino
42
4k
How GitHub (no longer) Works
holman
316
150k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Done Done
chrislema
186
16k
A Tale of Four Properties
chriscoyier
163
24k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Transcript
utf8mb4_0900_bin utf8mb4_0900_bin とみたまさひろ 2019-08-19 MyNA会 2019年8月 1
自己紹介 自己紹介 とみたまさひろ 富士通クラウドテクノロジーズ 日本MySQLユーザ会 文字化け担当 @tmtms https://tmtm.github.io/mysql-params/ 2
utf8mb4_0900_bin utf8mb4_0900_bin 3
utf8mb4_0900_bin utf8mb4_0900_bin Collation名 MySQL 8.0.17 から登場 4
Collation Collation 文字のソート順 文字の一致/不一致 デフォルトの utf8mb4_0900_ai_ci では a = A
= A, 1 = ① は = ぱ = ば = ハ = パ = バ 平成 = ㍻ != 5
https://suzuri.jp/tmtms/1934346/t-shirt/s/sumi 6
utf8mb4_bin との違い utf8mb4_bin との違い mysql> SHOW COLLATION LIKE 'utf8mb4%bin'; +------------------+---------+-----+---------+----------+---------+---------------+
| Collation | Charset | Id | Default | Compiled | Sortlen | Pad_attribute +------------------+---------+-----+---------+----------+---------+---------------+ | utf8mb4_0900_bin | utf8mb4 | 309 | | Yes | 1 | NO PAD | utf8mb4_bin | utf8mb4 | 46 | | Yes | 1 | PAD SPACE +------------------+---------+-----+---------+----------+---------+---------------+ 7
CollationのPAD属性 CollationのPAD属性 8.0 から追加 PAD SPACE - 末尾空白文字の有無を無視する 5.7までの振る舞い NO
PAD - 末尾空白文字の有無を無視しない 8.0からの新しいCollationだけ utf8mb4_*0900_* 8
PAD SPACE と NO PAD PAD SPACE と NO PAD
mysql> set names utf8mb4 collate utf8mb4_unicode_520_ci; mysql> select 'a' = 'a '; +--------------+ | 'a' = 'a ' | +--------------+ | 1 | +--------------+ mysql> set names utf8mb4 collate utf8mb4_0900_ai_ci; mysql> select 'a' = 'a '; +--------------+ | 'a' = 'a ' | +--------------+ | 0 | +--------------+ 9
utf8mb4_0900_bin ができた経緯(妄想) utf8mb4_0900_bin ができた経緯(妄想) utf8mb4_bin にも NO PAD バージョンが欲しい 互換のために
utf8mb4_bin は変更できない utf8mb4_0900_bin 新設 10
utf8mb4_bin と utf8mb4_0900_bin utf8mb4_bin と utf8mb4_0900_bin mysql> set names utf8mb4
collate utf8mb4_bin; mysql> select 'a' = 'a '; +--------------+ | 'a' = 'a ' | +--------------+ | 1 | +--------------+ mysql> set names utf8mb4 collate utf8mb4_0900_bin; mysql> select 'a' = 'a '; +--------------+ | 'a' = 'a ' | +--------------+ | 0 | +--------------+ 11
名前がイマイチな気がする 名前がイマイチな気がする 12
Collation Collation デフォルト: utf8mb4_0900_ai_ci 要素 意味 utf8mb4 4バイトUTF-8 0900 Unicode
9.0.0 ai アクセントの違いを無視 ci 大文字小文字の違いを無視 13
0900 は Unicode 9.0.0 準拠のCollationという意味 utf8mb4_0900_bin は Unicode 準拠じゃない NO
PADなCollationは0900だけだからこうなった? それにしてもなー 14
測ってないけどたぶん utf8mb4_bin よりも速いから みんな utf8mb4_0900_bin を使うといいと思う 15