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
22
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
21
Ruby Silverを取得してみた / get ruby silver
kengohayata
0
17
Ruby と Rails のざっくりとした Cookie の扱い方 / use cookie for ruby and rails
kengohayata
0
50
【LT会】進数を学ぼう! / study base number
kengohayata
0
14
【LT会】睡眠テクニックを身につける / study sleep technique
kengohayata
0
61
エンジニア座談会告知
kengohayata
0
58
未経験転職エンジニア座談会資料
kengohayata
0
57
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Documentation Writing (for coders)
carmenintech
75
5.1k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Designing for humans not robots
tammielis
254
26k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Speed Design
sergeychernyshev
32
1.2k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Designing Experiences People Love
moore
142
24k
A Modern Web Designer's Workflow
chriscoyier
697
190k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
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)
パフォーマンスチューニングするぞ