Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
utf8mb4_0900_bin
Search
とみたまさひろ
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.3k
夢の印税生活 / Life on Royalties
tmtms
0
690
文字列の並び順 / String Collation
tmtms
1
280
日本MySQLユーザ会ができるまで / making MyNA
tmtms
1
1.2k
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.4k
ショートカットと端末 / shortcut & terminal
tmtms
2
1.1k
Other Decks in Technology
See All in Technology
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
1
140
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
7
5.8k
ハードウェアコンペでもAI駆動開発が進んでいる話
iotengineer22
1
680
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
120
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1.2k
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
510
AIに攻撃される前に、AIに攻撃させる
tsuchikazu
0
170
Getting Started with Google Antigravity
glaforge
0
190
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
2.1k
USB PDを使ってスマホを労わりたい
raspython3
0
160
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
2
1.5k
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
600
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
300
Claude Code のすすめ
schroneko
67
230k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Crafting Experiences
bethany
1
380
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
KATA
mclloyd
PRO
35
16k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
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