page114
96
WHERE r_name IN ( 'EUROPE', 'MIDDLE EAST' )
UNION ALL
SELECT r_regionkey,
r_name,
'APAC' AS r_regiongroup
FROM region_baseline
WHERE r_name = 'ASIA'
)
SELECT rg.r_regiongroup AS region_group,
rg.r_name AS region_name,
n.n_name AS country_name
FROM regiongroup rg,
nation_baseline n
WHERE rg.r_regionkey = n.n_regionkey
ORDER BY 1, 2, 3;
When you examine the resultant query profile, you can see that the output of the
build side (
UNION ALL
output) has been pushed down to the probe side as evidenced by
the row counts returned from the
TableScan(9)
, as shown in Figure 3-18.
ChapTer 3
The Query profiler