??ν?MySQL??????????300????
?????opensource ???????[ 2017/5/12 10:37:04 ] ????????MySQL ????? ???????
?????????????????????????λ????????
????MySQL ??????????????????????????? my.cnf ???????slow_query_log ?????”On”?? ???? long_query_time ????????????β??????????????????????????? 0.2??slow_query_log_file ???????????????????·??????????????????????????趨????????????????????С?
?????????λ??Щ???????????????????????MySQL????EXPLAIN????????????SELECT??DELETE??INSERT??REPLACE??UPDATE????????á??????????????????????????
????EXPLAIN SELECT picture.id?? picture.title
????FROM picture
????LEFT JOIN album ON picture.album_id = album.id?WHERE album.user_id = 1;
????????????????????????????д???????????????????
??????????????????key?????????????????????
???????????????picture??2?????У??????picture????????album??2???С???ζ????ò??????????album??400???С??????????????Ч??
????????
??????????????????????????????????????е???????????????????????????β?????????????????????????????λ??
???????????????????????????衣??????picture.album_id???????????
????ALTER TABLE picture ADD INDEX(album_id);
??????????в???????????????picture?б????????????е?album?????????????????????album????????album_id???????????λ?????picture?????????????????20?????????????317????
???????????·?????????????????????????????????
????ALTER TABLE album ADD INDEX(user_id);
??????Σ?album??????????裬???user_id??????????λ?????album???????100??album?????????album_id??????picture???????????????????????????????в?????????????????????????380????
?????????????ζ?????????????????????????????д??????????????????????????????????????д???????????????????????????????????????????EXPLAIN????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11