query taking time

Database
Enthusiast

query taking time

HI ,
I have an explain of an SQL statement which takes too much time.

We do an All-AMPs JOIN step from Spool 25662 (Last Use) by way of an all-rows scan, which is joined to table DEVICE_ESN_SS. Spool 25662 and table DEVICE_ESN_SS are joined using a merge join . The result goes into Spool 25671, which is duplicated on all AMPs. This step ends a parallel block of steps.

this step takes too much time. could you suggest how to avoid this type of scenario.i guess that 'duplication on all amps' takes too much time. how to avoid that?