The ROLLUP and CUBE clauses perform internal UNION ALL set
operations between multiple query group aggregations. The GROUPING
Figure 8.15
GROUPING
SETS is not always
faster than CUBE.
232
8.2
GROUP BY Clause Extensions
SETS clause minimizes on the internal UNION ALL operations produced
by the ROLLUP and CUBE clauses. Therefore:
GROUP BY GROUPING SETS
(
(l.city, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.