Skip to Content
0
Former Member
Nov 02, 2010 at 04:30 PM

SELECT query very slow, need suggestion.

33 Views

Dear all,

Below stmt was coded in my report program.

It was taking around 14 seconds in development system. The days in s_datum was just 1 or 2 days max.

But when the same was transferred to test system, it is taking almost 10 minutes, though it we gave just 1 day.

SELECT * FROM likp INTO TABLE i_likp

WHERE erdat IN s_datum AND wadat_ist > '00000000'

AND lfart <> 'EL'

AND vstel not in s_vstel.

Some of you might suggest to make SELECT query with only s_datum, but i tried it in dev system, it was taking almost 22 secs with only s_datum. I thought it could be more worse in test system so, did not move that idea.

Can some one please suggest me why it is happening so.