ããã¾ãã¦ããã§ã¨ããããã¾ãï¼ ä»å¹´ã¯ç°ä¸çæ¾æµªã¡ã·ã®ã¢ãã¡ãæ¾éããããããã®ã§æ¥½ãã¿ãªããã¯ã¨ã³ãã®åç° (tomtwinkle)ã§ãã å é¨ã§éç¨ãã¦ããSQLã¬ãã¥ã¼ãã§ãã¯ãªã¹ãã®ä¸é¨ãæ½åºãæãã¤ãã§è¿½è¨ãã¦è¡ã£ãçµæãçµæ§ãªåéã«ãªã£ã¦ãã¾ãã¾ããã æãªæã§ãæµãèªã¿ãã¦é ããã¨ãããããã§ãã Motivation SQLã¬ãã¥ã¼è¦³ç¹ 大ããSQLãå¤æ´ãããä¿®æ£ã®éã«ã¯EXPLAINãã¬ãã¥ã¼å 容ã«å ãã æ¤ç´¢ã®ãã¼ã«INDEXã使ç¨ãã¦ããã SQLçºè¡åæ°ãN+1(1+N)ã®æ§é ã«ãªã£ã¦ããªãã ãµãã¯ã¨ãªãå©ç¨ããSQLã¯ããã©ã¼ãã³ã¹è¦ãã§ã㯠Viewã®å©ç¨ã¯åºæ¬çã«ç¦æ¢ CROSS JOINã¯ç¦æ¢ WHEREå¥ã§ååã«çµã£ãæ¤ç´¢ããã¦ããã å¿ è¦ãªcolumnã ãSELECTãã¦ããã ã¬ã³ã¼ãæ°ã ãå¿ è¦ãªå ´åã«COUNTç¨ã®SQLãçºè¡ãã¦ããã éè¨é¢
{{#tags}}- {{label}}
{{/tags}}