本帖最後由 7h1r733n 於 2017-6-12 14:32 編輯
回覆 7h1r733n
細公司無 DBA
我意思係 join table 會用到的key (XXXX_ID) 或者 enum, 有錯求指正 :adore ...
gamezz 發表於 2017-6-12 12:07 
幾時落index... 落唔落index.. 只能講.. it depends.....
我貼幾條link比你... 雖然有D舊.. 今年係2017年.. 但講D野都係正確既..
How to avoid the full table scan
Blocks read using index vs. full table scan
Reducing LIOs
我舉一個好簡單既例... HDD/SSD sequential read vs 4k random read.. 咁你就應該明... 你要select越多野.. 個index就會越慢... 有時會index照落.. 但寫query果陣會停左唔用個index.. 特別係類似要gen report呢D時候..
上面只係講"Read"
一般黎講經常Insert, 大量Update既table.. 有index都係會..."慢D既"  |