$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MySQLでタグ検索
Search
T. MOTOOKA
October 23, 2014
Technology
0
500
MySQLでタグ検索
2014.10.23(木) MySQL勉強会 in 大阪 LT
タグ件数10^5〜10^6程度のタグ検索の仕組みをMySQLで組んでみた話
T. MOTOOKA
October 23, 2014
Tweet
Share
More Decks by T. MOTOOKA
See All by T. MOTOOKA
一意に定まらない話
motooka
0
45
自動化した処理を止めてしまった話
motooka
0
130
StoredFunctionのすゝめ
motooka
1
130
コメントは英語で書く!
motooka
1
130
TCPポート使い切り事件
motooka
1
490
SVG画像をPHPで生成しよう
motooka
0
1.4k
Working with Database Replications in CakePHP
motooka
1
2.1k
文字とPDFとPDFKit
motooka
2
2.2k
SVG破損事例の解説
motooka
1
810
Other Decks in Technology
See All in Technology
業務のトイルをバスターせよ 〜AI時代の生存戦略〜
staka121
PRO
2
220
AlmaLinux + KVM + Cockpit で始めるお手軽仮想化基盤 ~ 開発環境などでの利用を想定して ~
koedoyoshida
0
120
AI駆動開発における設計思想 認知負荷を下げるフロントエンドアーキテクチャ/ 20251211 Teppei Hanai
shift_evolve
PRO
2
430
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
0
900
Amazon Connect アップデート! AIエージェントにMCPツールを設定してみた!
ysuzuki
0
110
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
5
560
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
170
生成AI時代におけるグローバル戦略思考
taka_aki
0
210
初めてのDatabricks AI/BI Genie
taka_aki
0
230
【U/Day Tokyo 2025】Cygames流 最新スマートフォンゲームの技術設計 〜『Shadowverse: Worlds Beyond』におけるアーキテクチャ再設計の挑戦~
cygames
PRO
2
900
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
230
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
490
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
18
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
180
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
370
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
91k
Being A Developer After 40
akosma
91
590k
Ethics towards AI in product and experience design
skipperchong
1
140
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
120
Site-Speed That Sticks
csswizardry
13
1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
KATA
mclloyd
PRO
33
15k
Transcript
MySQLͰλάݕࡧ 2014.10.23() MySQLษڧձ in େࡕ https://atnd.org/events/57326 ຊԬ ٱ
ࣗݾհ ຊԬ ٱʢ @t_motooka / id:t_motookaʣ Web ΞϓϦ։ൃ iOS ΞϓϦ։ൃ
ςΫχΧϧΤϯδχΞʢσʔλϕʔεʣ ʢݱɿσʔλϕʔεεϖγϟϦετʣ
Disclaimer ͜ͷ༰ݸਓͷݟղΛड़ͨͷͰ͋ͬͯɺ ॴଐ͍ͯ͠Δʗ͍ͯͨ͠৫ͱແؔͰ͢ɻ
Ͳ͏͢Δʁ λάݕࡧ શจݕࡧʁ λά֨ೲςʔϒϧʁ
ͦͦɿλάݕࡧͷཁ݅ શҰகʁɹ෦Ұகʁɹ͍͋·͍ʁ ෳλάࢦఆͷΑΔߜΓࠐΈɹYes or Noʁ λάจࣈྻϢʔβೖྗɹYes or Noʁ
ࠓճͷཁ݅ λάͷ෦Ұக Ұக߹͍ʹΑΔॱҐ͚ʢશҰக্ʹདྷΔɺʣ ෳλάͰͷ AND ݕࡧ 5ສ݅ͷຊମσʔλɺ100ສ݅ͷλά ˞ॏෳআڈͨ͠λά4ສ݅ఔ
࠷ॳʹదʹΜͩͷ ຊମςʔϒϧʹλάςʔϒϧΛ୯७ʹ inner join ඞવతʹλάςʔϒϧΛ full [table | index] scan
ʢ࣌50ສ݅ʣ ʊਓਓਓਓਓਓʊ ʼɹेඵɹʻ ʉ:?:?:?:?:ʉ
ߟ͑ͨ݁Ռ ॏෳআڈͨ͠λάͷٙࣅ Materialized View Λ༻ҙʢ4ສ݅ʣ ɹˠ ͜͜Ͱ full table scan
ͦͷ݁ՌΛ engine=memory ͳҰ࣌දʹಥͬࠐΉ ˞֤λάͷҰக߹͍ΛείΞԽʢޙͰ order by Ͱ͏ʣ ͦ͜ͱλάදΛjoinʢͪΌΜͱ index ͬͯ͘ΕΔʣ ͳΜͱ͔࣮༻ʹ͑ΔϨϕϧ
·ͱΊ Materialized View… શจݕࡧ͡Όͳͯ͘ ෦Ұகͷλάݕࡧ͕ͦΕͳΓͷͰ ͬͱ͘Ͱ͖ͨΒվΊͯLTΛ…