Skip to Content
0
Former Member
Sep 04, 2009 at 07:33 AM

Select query: performance optimization

130 Views

Hi,

I run a report in background programatically. To extract the Spool number i wrote the following select query.

SELECT * FROM tsp01
           INTO TABLE lt_tsp01
           WHERE rqowner = sy-uname .

   SORT lt_tsp01 BY rqident DESCENDING.
  READ TABLE lt_tsp01 INTO lwa_tsp01 INDEX gc_int_1.
  MOVE lwa_tsp01-rqident TO lv_spool_id.

It is working fine. But when i run code inspector, it shows an error message interms of performance " Large table TSP01: No first field of a table index in WHERE condition".

Can you tell me a better way to write this query. How can i optimize it.

Thanks

Vishnu

Moderator message - Moved to the correct forum

Edited by: Rob Burbank on Sep 4, 2009 1:44 PM