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
12
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
9
RailsのQueryオブジェクトとは / What is a Query Object in Rails?
kengohayata
0
13
Ruby Silverを取得してみた / get ruby silver
kengohayata
0
15
Ruby と Rails のざっくりとした Cookie の扱い方 / use cookie for ruby and rails
kengohayata
0
28
【LT会】進数を学ぼう! / study base number
kengohayata
0
11
【LT会】睡眠テクニックを身につける / study sleep technique
kengohayata
0
56
エンジニア座談会告知
kengohayata
0
44
未経験転職エンジニア座談会資料
kengohayata
0
51
Featured
See All Featured
Faster Mobile Websites
deanohume
305
30k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Building Adaptive Systems
keathley
39
2.4k
KATA
mclloyd
29
14k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Statistics for Hackers
jakevdp
797
220k
A better future with KSS
kneath
238
17k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
52k
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)
パフォーマンスチューニングするぞ