我正在运行代码如下。我遇到了长时间运行的问题。有没有办法让它跑得更快?
SELECT
a.data_date as day
, sum(a.column1) + sum(a.column2) as total
, sum(a.column1) as part1
, sum(a.column2) as part2
, sum(b.column1) as alien
FROM table1 a
INNER JOIN table1 b
ON a.data_date = b.data_date AND a.column3 = b.column3
WHERE a.data_date ='20131001'
and a.column3 = 12345
and a.column4 is not NULL
and b.column4 is NULL
GROUP BY
a.data_date