KMCæ¥å宿2018ã§ã®çºè¡¨è³æã§ã
ããæ©è½ãéããªã©ã¨ãã£ãçç±ã§ãDBã®ã©ã®ã¯ã¨ãªãé ããææ¡ããããã¨ã¯ããããã¾ãããããªæãPostgreSQLã®auto_explainã便å©ã ã£ãã®ã§ç´¹ä»ã auto_explainã使ãã¨ãæå®ããå®è¡æé以ä¸ãå©ç¨ãã¦ããã¯ã¨ãªã«å¯¾ãã¦ãèªåã§å®è¡è¨ç»ããã°ãã¡ã¤ã«ã«åºåãã¦ãããã¨ãããã®ã詳細ã¯ãã¡ãã https://www.postgresql.jp/document/9.6/html/auto-explain.html https://www.postgresql.jp/document/9.6/html/using-explain.html æè¿ä¾¿å©ã«ä½¿ããã®ã¯ä»¥ä¸ã®è¨å®ã # èªåã§EXPLAIN ANALYZEãã¦ããã©ã¼ãã³ã¹è§£æãããæç¨ session_preload_libraries = 'auto_explain' auto_explain.log
è«çæ§ã®é«ã commit ãä½ãæ¹æ³ git rebase -i ã³ãã³ããæ´»ç¨ããã rebase -i ã使ç¨ãããã¨ã§ commit ã® çµå/åå²/æ¸ãæã/é åºå ¥ãæ¿ã ãå¯è½ã 以ä¸ã§ã¯ä¸çªä½¿ãã§ãããçµå(squash)ã«ã¤ãã¦ç´¹ä»ãã¾ãã $ git log --oneline bfc2a57 (HEAD -> master) TOPç»é¢ã®å®è£ e84e22e ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®typoä¿®æ£ ba76419 ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®è¿½å ãããªæãã® commit log ããã£ãã¨ãã¾ãã ãããããã¡ãªã±ã¼ã¹ã ã¨æãã¾ãã typoä¿®æ£ã ãã®ã³ããããªãã¦ã¾ã¨ãã¦ãã¾ãããã§ãããã ãã㧠git rebase -i ã®åºçªã§ãã $ git rebase -i HEAD~3 # HEAD 㯠@ ã¨ãæ¸ãããä¾¿å© $ git rebase -i @~3 ä¸ã®ã³ãã³ãã§H
STEP1ãèªåèªèº«ãåæãã¦ã¿ãã [601KB] STEP2ãä»äºãæ¢ãã¦ã¿ãã [637KB] STEP3ãå¥ç´ããã [439KB] ã»è¦ç©æ¸ã®åèä¾ [609KB] ã»å¨å® ã¯ã¼ã¯ã®é©æ£ãªå®æ½ã®ããã®ã¬ã¤ãã©ã¤ã³ [505KB] ã»å¥ç´æ¸ã®åèä¾ [687KB] STEP4ãä½æ¥ããã [455KB] ã»æ å ±ã»ãã¥ãªãã£ã®éè¦æ§ã«ã¤ã㦠[592KB] STEP5ãç´åãã代éãè«æ±ããã [442KB] ã»è«æ±æ¸ã®åèä¾ [609KB] ã»ç¨éã«ã¤ãã¦ã社ä¼ä¿éºã«ã¤ã㦠[451KB]
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}