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
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
160
自動化した処理を止めてしまった話
motooka
0
250
StoredFunctionのすゝめ
motooka
1
240
コメントは英語で書く!
motooka
1
140
TCPポート使い切り事件
motooka
1
510
SVG画像をPHPで生成しよう
motooka
0
1.5k
Working with Database Replications in CakePHP
motooka
1
2.2k
文字とPDFとPDFKit
motooka
2
2.3k
SVG破損事例の解説
motooka
1
840
Other Decks in Technology
See All in Technology
AlloyDB 奮闘記
hatappi
0
150
アーキテクチャモダナイゼーションを実現する組織
satohjohn
1
1.1k
組織全体で実現する標準監視設計
yuobayashi
3
490
社内レビューは機能しているのか
matsuba
0
150
スクリプトの先へ!AIエージェントと組み合わせる モバイルE2Eテスト
error96num
0
180
めちゃくちゃ開発するQAエンジニアになって感じたメリットとこれからの課題感
ryuhei0000yamamoto
0
120
今のWordPress の制作手法ってなにがあんねん?(改) / What’s the Deal with WordPress Development These Days?
tbshiki
0
500
Postman v12 で変わる API開発ワークフロー (Postman v12 アップデート) / New API development workflow with Postman v12
yokawasa
0
140
AWSの資格って役に立つの?
tk3fftk
2
360
Mitigating geopolitical risks with local-first software and atproto
ept
0
100
身体を持ったパーソナルAIエージェントの 可能性を探る開発
yokomachi
1
130
Everything Claude Code を眺める
oikon48
11
7.4k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Prompt Engineering for Job Search
mfonobong
0
200
Speed Design
sergeychernyshev
33
1.6k
Agile that works and the tools we love
rasmusluckow
331
21k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Google's AI Overviews - The New Search
badams
0
930
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
480
HDC tutorial
michielstock
1
560
Joys of Absence: A Defence of Solitary Play
codingconduct
1
310
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
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Λ…