Thanks for the response Dieter.
I tried creating the view, but that doesn't seem to change the plan.
CREATE VIEW SSURI.V_CDC1 (BATCH_START, BATCH_END)
AS
SELECT CAST(BATCH_START AS TIMESTAMP(6)),
CAST(BATCH_END AS TIMESTAMP(6))
FROM SSURI.CDC_BATCH1;
EXPLAIN SELECT * FROM SSURI.CUSLDSFL_SI
WHERE AUD_TIME >= (SELECT BATCH_START FROM SSURI.V_CDC1)
AND AUD_TIME <= (SELECT BATCH_END FROM SSURI.V_CDC1)
4) We do an all-AMPs RETRIEVE step from SSURI.CDC_BATCH1 by way of an
all-rows scan with no residual conditions into Spool 1 (all_amps),
which is built locally on the AMPs. The size of Spool 1 is
estimated with high confidence to be 1 row (35 bytes). The
estimated time for this step is 0.03 seconds.
5) We do an all-AMPs DISPATCHER RETRIEVE step from Spool 1 (Last Use)
by way of an all-rows scan and send the rows back to the
Dispatcher.
6) We do an all-AMPs RETRIEVE step from SSURI.CDC_BATCH1 by way of an
all-rows scan with no residual conditions into Spool 2 (all_amps),
which is built locally on the AMPs. The size of Spool 2 is
estimated with high confidence to be 1 row (35 bytes). The
estimated time for this step is 0.03 seconds.
7) We do an all-AMPs DISPATCHER RETRIEVE step from Spool 2 (Last Use)
by way of an all-rows scan and send the rows back to the
Dispatcher.
8) We do an all-AMPs RETRIEVE step from SSURI.CUSLDSFL_SI by way of
an all-rows scan with a condition of (
"(SSURI.CUSLDSFL_SI.Aud_Time <= :%SSQ18) AND
(SSURI.CUSLDSFL_SI.Aud_Time >= :%SSQ17)") into Spool 3
(group_amps), which is built locally on the AMPs. The size of
Spool 3 is estimated with no confidence to be 122,089,337 rows (
117,572,031,531 bytes). The estimated time for this step is 2
minutes and 54 seconds.
Thanks for the response Dieter.
I tried creating the view, but that doesn't seem to change the plan.
CREATE VIEW SSURI.V_CDC1 (BATCH_START, BATCH_END)
AS
SELECT CAST(BATCH_START AS TIMESTAMP(6)),
CAST(BATCH_END AS TIMESTAMP(6))
FROM SSURI.CDC_BATCH1;
EXPLAIN SELECT * FROM SSURI.CUSLDSFL_SI
WHERE AUD_TIME >= (SELECT BATCH_START FROM SSURI.V_CDC1)
AND AUD_TIME <= (SELECT BATCH_END FROM SSURI.V_CDC1)
4) We do an all-AMPs RETRIEVE step from SSURI.CDC_BATCH1 by way of an
all-rows scan with no residual conditions into Spool 1 (all_amps),
which is built locally on the AMPs. The size of Spool 1 is
estimated with high confidence to be 1 row (35 bytes). The
estimated time for this step is 0.03 seconds.
5) We do an all-AMPs DISPATCHER RETRIEVE step from Spool 1 (Last Use)
by way of an all-rows scan and send the rows back to the
Dispatcher.
6) We do an all-AMPs RETRIEVE step from SSURI.CDC_BATCH1 by way of an
all-rows scan with no residual conditions into Spool 2 (all_amps),
which is built locally on the AMPs. The size of Spool 2 is
estimated with high confidence to be 1 row (35 bytes). The
estimated time for this step is 0.03 seconds.
7) We do an all-AMPs DISPATCHER RETRIEVE step from Spool 2 (Last Use)
by way of an all-rows scan and send the rows back to the
Dispatcher.
8) We do an all-AMPs RETRIEVE step from SSURI.CUSLDSFL_SI by way of
an all-rows scan with a condition of (
"(SSURI.CUSLDSFL_SI.Aud_Time <= :%SSQ18) AND
(SSURI.CUSLDSFL_SI.Aud_Time >= :%SSQ17)") into Spool 3
(group_amps), which is built locally on the AMPs. The size of
Spool 3 is estimated with no confidence to be 122,089,337 rows (
117,572,031,531 bytes). The estimated time for this step is 2
minutes and 54 seconds.