mysql:15755
From: <gotou1213@xxxxxxxxxx>
Date: Tue, 24 Apr 2012 13:50:39 +0900
Subject: [mysql 15755] Re: 行列変換を行う処理を高速化するには?
後藤です。 > SELECT nm, > sum(case when dd = '01' then 1 else 0 end) as 'h101', > sum(case when dd = '02' then 1 else 0 end) as 'h102', > (中略) > sum(case when dd = '31' then 1 else 0 end) as 'h131' > FROM nippo > WHERE sycd = #ck_sycd# and yymm = #yymm# > GROUP BY nm ORDER BY nm; このときに explain すると、どのような結果になるでしょうか?
15742 2012-04-20 09:36 [ram <ram@xxxxxxxxxx>] 行列変換を行う処理を高速化するには? 15743 2012-04-20 11:12 ┣[中川 貴 <takashi.nak] 15744 2012-04-20 13:58 ┃┗[ram <ram@xxxxxxxxxx>] 15745 2012-04-20 15:24 ┃ ┗[中川 貴 <takashi.nak] 15747 2012-04-20 17:58 ┃ ┗[ram <ram@xxxxxxxxxx>] 15748 2012-04-20 22:05 ┃ ┣[Tsubasa Tanaka <yoku] 15749 2012-04-21 01:06 ┃ ┃┗[Tsubasa Tanaka <yoku] 15750 2012-04-21 02:05 ┃ ┃ ┗[Tsubasa Tanaka <yoku] 15753 2012-04-23 15:39 ┃ ┃ ┗[ram <ram@xxxxxxxxxx>] 15756 2012-04-25 14:54 ┃ ┗[中川 貴 <takashi.nak] 15758 2012-04-25 16:34 ┃ ┗[ram <ram@xxxxxxxxxx>] 15759 2012-04-25 17:09 ┃ ┗[中川 貴 <takashi.nak] 15760 2012-04-25 17:18 ┃ ┗[Tomohiro 'Tomo-p' KA] 15761 2012-04-25 18:25 ┃ ┗[中川 貴 <takashi.nak] 15762 2012-04-25 19:05 ┃ ┗[Tomohiro 'Tomo-p' KA] 15752 2012-04-23 14:17 ┗[<gotou1213@xxxxxxxxx] 15754 2012-04-23 19:53 ┗[ram <ram@xxxxxxxxxx>] -> 15755 2012-04-24 13:50 ┗[<gotou1213@xxxxxxxxx] 15757 2012-04-25 15:39 ┗[ram <ram@xxxxxxxxxx>] 15765 2012-04-26 14:12 ┗[<gotou1213@xxxxxxxxx]