#效能低、執行時間太長、等待時間太長、連線查詢、索引失效。
(1)寫程式
select distinct ... from ... join ... on ... where ... group by ... having ... order by ... limit ...
(2)解析過程
from ... on ... join ... where ... group by ... having ... select distinct ... order by ... limit ...
索引相當於書的目錄。
索引的資料結構是B 樹。
以上是MySQL中什麼情況下進行sql優化的詳細內容。更多資訊請關注PHP中文網其他相關文章!