Troels, basically I believe all branches are alive if they all take time.
to determine which part are running, try combination as below,
1. run db2exfmt/db2expln to get the access plan. pls see to the "subsection".
you will see the two branches are subsection #1 and #2.
RETURN
( 1)
( 2)
/ \
GRPBY GRPBY
( 3) ( 9)
( 4) ( 10)
( 5) ( 11)
( 6) ( 12)
( 7) ( 13)
( 8) ( 14)
xxx yyy
2. run the sql.
3. get the snapshot for the application which is running the sql. you will get the running subsection #.
......
Dynamic SQL statement text:
select 'x', xxx, count(*) from xxxx group by xxx_idn union all select 'y', yyy, count(*) from yyyy group by yyy
Subsection number = 1
Subsection database partition number = 1
Subsection status = Executing
Execution elapsed time (seconds) = 27
Total user CPU time (sec.ms) = 14.860000
Total system CPU time (sec.ms) = 0.210000
Current number of tablequeue buffers overflowed = 0
Total number of tablequeue buffers overflowed = 0
Maximum number of tablequeue buffers overflowed = 0
Rows received on tablequeues = 0
Rows sent on tablequeues = 0
Rows read = 2042650
Rows written = 0
Number of agents working on subsection = 1
Agent process/thread ID = 26835
Subsection number = 2
Subsection database partition number = 1
Subsection status = Executing
Execution elapsed time (seconds) = 27
Total user CPU time (sec.ms) = 14.160000
Total system CPU time (sec.ms) = 0.270000
Current number of tablequeue buffers overflowed = 0
Total number of tablequeue buffers overflowed = 0
Maximum number of tablequeue buffers overflowed = 0
Rows received on tablequeues = 0
Rows sent on tablequeues = 0
Rows read = 1922264
Rows written = 0
Number of agents working on subsection = 1
Agent process/thread ID = 12558