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
470
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
SVG画像をPHPで生成しよう
motooka
0
850
Working with Database Replications in CakePHP
motooka
1
1.7k
文字とPDFとPDFKit
motooka
2
1.5k
SVG破損事例の解説
motooka
1
520
エラー処理のUIデザイン
motooka
0
1.2k
モバイルアプリとGDPR
motooka
0
1.7k
続・パイプを通るPDF
motooka
0
970
JVNに情報掲載した話
motooka
1
1.4k
Emoji Modifiers
motooka
0
1.1k
Other Decks in Technology
See All in Technology
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
430
プロデザ! BY リクルート vol.18_リクルートのリサーチ実践組織「リサーチブーストコミュニティ」
recruitengineers
PRO
3
270
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
200
MapLibreとAmazon Location Service
dayjournal
1
150
家族アルバム みてねにおけるGrafana活用術 / Grafana Meetup Japan Vol.1 LT
isaoshimizu
1
310
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
0
2.6k
Tellus の衛星データを見てみよう #mf_fukuoka
kongmingstrap
0
160
ServiceNow Knowledge Learning Rise up
manarobot
0
200
AOAI をきっかけに 社内の Azure 管理を見直した話
recruitengineers
PRO
1
260
反実仮想機械学習とは何か
usaito
PRO
10
3.6k
ChatworkのSRE部って実は 半分くらいPlatform Engineering部かもしれない
saramune
0
160
20240416_devopsdaystokyo
kzkmaeda
1
220
Featured
See All Featured
Clear Off the Table
cherdarchuk
84
310k
Writing Fast Ruby
sferik
621
60k
How to train your dragon (web standard)
notwaldorf
73
5.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
40
4.4k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Scaling GitHub
holman
457
140k
Build your cross-platform service in a week with App Engine
jlugia
225
17k
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
Designing the Hi-DPI Web
ddemaree
276
33k
Designing for humans not robots
tammielis
248
25k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
274
13k
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Λ…