I have a query like this:
SELECT HOUR(datetime) as Hour, COUNT(*) as hits, SUM(clicks) FROM visitors_log_table WHERE datetime >= CURDATE() GROUP BY Hour WITH ROLLUP
It works fine. But I don't need
GROUP BY for the
I only need the
WITH ROLLUP result for it.
This query is just an example. In my query I have many more columns like the
clicks column where I don't need a
My table is very, very large, so performance is important. The
datetime column is indexed.
So should I do a seperate query, or should I leave it like that, or...?