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
490
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
StoredFunctionのすゝめ
motooka
1
77
コメントは英語で書く!
motooka
1
79
TCPポート使い切り事件
motooka
1
420
SVG画像をPHPで生成しよう
motooka
0
1.2k
Working with Database Replications in CakePHP
motooka
1
2k
文字とPDFとPDFKit
motooka
2
2k
SVG破損事例の解説
motooka
1
700
エラー処理のUIデザイン
motooka
0
1.4k
モバイルアプリとGDPR
motooka
0
1.9k
Other Decks in Technology
See All in Technology
Apache Iceberg Case Study in LY Corporation
lycorptech_jp
PRO
0
350
開発者のための FinOps/FinOps for Engineers
oracle4engineer
PRO
2
210
Pwned Labsのすゝめ
ken5scal
2
530
OPENLOGI Company Profile for engineer
hr01
1
20k
いまからでも遅くない!コンテナでWebアプリを動かしてみよう!コンテナハンズオン編
nomu
0
170
2025/3/1 公共交通オープンデータデイ2025
morohoshi
0
100
大規模アジャイルフレームワークから学ぶエンジニアマネジメントの本質
staka121
PRO
3
1.4k
AWSアカウントのセキュリティ自動化、どこまで進める? 最適な設計と実践ポイント
yuobayashi
7
990
クラウド関連のインシデントケースを収集して見えてきたもの
lhazy
9
1.8k
DeepSeekとは?何がいいの? - Databricksと学ぶDeepSeek! 〜これからのLLMに備えよ!〜
taka_aki
1
160
サイト信頼性エンジニアリングとAmazon Web Services / SRE and AWS
ymotongpoo
7
1.7k
IAMのマニアックな話2025
nrinetcom
PRO
6
1.3k
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Visualization
eitanlees
146
15k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Navigating Team Friction
lara
183
15k
Gamification - CAS2011
davidbonilla
80
5.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
GitHub's CSS Performance
jonrohan
1030
460k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
Facilitating Awesome Meetings
lara
53
6.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
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Λ…