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
480
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
1
63
TCPポート使い切り事件
motooka
1
220
SVG画像をPHPで生成しよう
motooka
0
1.1k
Working with Database Replications in CakePHP
motooka
1
1.9k
文字とPDFとPDFKit
motooka
2
1.9k
SVG破損事例の解説
motooka
1
670
エラー処理のUIデザイン
motooka
0
1.4k
モバイルアプリとGDPR
motooka
0
1.8k
続・パイプを通るPDF
motooka
0
1.1k
Other Decks in Technology
See All in Technology
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
450
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
560
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
130
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
260
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
220
The Rise of LLMOps
asei
9
1.8k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
200
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
SSMRunbook作成の勘所_20241120
koichiotomo
3
170
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Designing for Performance
lara
604
68k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Designing the Hi-DPI Web
ddemaree
280
34k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Making Projects Easy
brettharned
115
5.9k
Fireside Chat
paigeccino
34
3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Agile that works and the tools we love
rasmusluckow
327
21k
What's new in Ruby 2.0
geeforr
343
31k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
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Λ…