Try this,
SELECT 'touch'
FROM siebel.S_EVT_ACT
WHERE ROW_ID =
(SELECT ROW_ID
FROM siebel.S_EVT_ACT
INTERSECT
SELECT T_ACT_EMP_ACTIVI
FROM FROM siebel.EIM_ACTIVITY
WHERE IF_ROW_BATCH_NUM = 501
AND T_ACT_EMP__EXS = 'N'
AND T_ACT_EMP__STA = 0
AND T_ACT_EMP__UNQ = 'Y'
AND IF_ROW_STAT_NUM = 0)
> Hi,
>
[quoted text clipped - 98 lines]
> INDEX: SIEBEL
> EIM_ACTIVITY_PA7
P. Adhia - 30 Sep 2006 01:10 GMT
> Try this,
>
[quoted text clipped - 11 lines]
> AND T_ACT_EMP__UNQ = 'Y'
> AND IF_ROW_STAT_NUM = 0)
Thanks for the suggestion. I wasn't looking to get an alternative SQL.
I just wanted to understand how to interpret the access plan.
Reading from left to right and bottom to up, I couldn't figure out how
can stream which is on left of an operator (FETCH) can receive input
from and depend on a stream which is on the right. Also, I can't say I
have seen FETCH operator with 3 input streams before. I know only the
most common variant, that is, FETCH operator used for indexed access to
table.
P Adhia
PS Although, I can't change the SQL, but if I could, why do you think
your version of the SQL is better? Do you think DB2 optimizer will
select a better access path?