Skip to Content
Aug 13, 2015 at 11:35 AM

Reduce FETCH time in a SELECT Query



I have a scenario where I need to fetch data from NAST table based on the selection criteria shown below.

SELECT kappl "Application type

objky "Object key

kschl "Message type

nacha "Message transmission medium

vsztp "Dispatch time

datvr "Processing date

uhrvr "Processing time

usnam "User name

vstat "Processing status of message

ldest"Spool: Output device

FROM nast

INTO TABLE t_nast1

WHERE kappl = c_v1

AND objky IN s_vbeln

AND kschl IN s_kschl

AND nacha IN s_nacha

AND datvr IN s_datvr

AND usnam IN s_usnam

AND vstat IN r_vstat.

But it is taking huge time to execute because the huge size of the table.

Could anyone suggest an alternative which takes lesser time.