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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
T. MOTOOKA
October 23, 2014
Technology
510
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MySQLでタグ検索
2014.10.23(木) MySQL勉強会 in 大阪 LT
タグ件数10^5〜10^6程度のタグ検索の仕組みをMySQLで組んでみた話
T. MOTOOKA
October 23, 2014
More Decks by T. MOTOOKA
See All by T. MOTOOKA
業務を観察する
motooka
0
89
一意に定まらない話
motooka
0
200
自動化した処理を止めてしまった話
motooka
0
290
StoredFunctionのすゝめ
motooka
1
290
コメントは英語で書く!
motooka
1
150
TCPポート使い切り事件
motooka
1
520
SVG画像をPHPで生成しよう
motooka
0
1.5k
Working with Database Replications in CakePHP
motooka
1
2.2k
文字とPDFとPDFKit
motooka
2
2.4k
Other Decks in Technology
See All in Technology
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
760
AGENTS.mdとSkillsで始めるAIエージェント活用
sonoda_mj
2
190
AmazonRoute 53ではじめてのドメイン取得!HTTPS化までの道のりを整理してみた
usanchuu
3
130
Bucharest Tech Week 2026 - Reinventing testing practices in the AI era
edeandrea
PRO
1
140
Claude Code×Terraform IaC テンプレート駆動開発
itouhi
1
490
個人最適 から 全体最適 へ AI情報共有会・AIギルド・AI-DLC で進める カンリーの組織展開
rfdnxbro
0
2.2k
Claude Code の Sandbox 機能を Anthropic Sandbox Runtime(srt) で試そう!/lets-play-anthropic-sandbox-runtime
tomoki10
1
530
2026 TECHFRESH 畢業分享會 - AI-Native 重塑軟體工程與虛擬講師
line_developers_tw
PRO
0
760
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
2
1.6k
日本 Fintech 未来予測レポート 2027〜2028年(手動編集版)
8maki
0
1.7k
AAIFに入ってみた ~内から見えるコミュニティ動向~
sato4
0
150
2026 TECHFRESH 畢業分享會 - 開發日常大解密!從領域驅動到企業級上線
line_developers_tw
PRO
0
760
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
220
How to Talk to Developers About Accessibility
jct
2
230
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
580
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
The Language of Interfaces
destraynor
162
27k
Claude Code のすすめ
schroneko
67
230k
The Limits of Empathy - UXLibs8
cassininazir
1
350
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
380
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
970
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
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Λ…