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
SQLの実行計画とは / What is an SQL execution plan
Search
K H
September 28, 2024
0
17
SQLの実行計画とは / What is an SQL execution plan
K H
September 28, 2024
Tweet
Share
More Decks by K H
See All by K H
ファシリテーションテクニック / facilitation technic
kengohayata
0
11
RailsのQueryオブジェクトとは / What is a Query Object in Rails?
kengohayata
0
16
Ruby Silverを取得してみた / get ruby silver
kengohayata
0
17
Ruby と Rails のざっくりとした Cookie の扱い方 / use cookie for ruby and rails
kengohayata
0
43
【LT会】進数を学ぼう! / study base number
kengohayata
0
14
【LT会】睡眠テクニックを身につける / study sleep technique
kengohayata
0
60
エンジニア座談会告知
kengohayata
0
55
未経験転職エンジニア座談会資料
kengohayata
0
57
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Statistics for Hackers
jakevdp
799
220k
Writing Fast Ruby
sferik
628
62k
What's in a price? How to price your products and services
michaelherold
246
12k
A designer walks into a library…
pauljervisheath
207
24k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Navigating Team Friction
lara
187
15k
Thoughts on Productivity
jonyablonski
69
4.7k
Code Review Best Practice
trishagee
69
18k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Testing 201, or: Great Expectations
jmmastey
42
7.6k
Transcript
SQLの実行計画とは
・意図したSQLのパフォーマンスが出せるように、 チューニングする目的で利用する ・特にインデックスが適切に使われているか、 フルテーブルスキャンをしているか特定できる SQLの実行計画とは? ・名前の通りSQLを実行するための計画
SQLの実行計画の読み方 ※Rails(MySQL)のexplainメソッドで実行) ref:MySQL公式ドキュメント(https://dev.mysql.com/doc/refman/8.0/ja/explain-output.html)
確認したいクエリの前に EXPLAIN を追加 ActiveRecord::Relationオブジェクトでexplainメソッドを実行する ・MySQL ・Rails SQLの実行計画の出力方法(MySQL、Rails)
パフォーマンスチューニングするぞ