Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

performance issue in table S975

syed_ibrahim5
Active Participant
0 Likes
563

hi experts,

i have to block the inactive customers (customers for whom the transaction has not happened) for a specified number of month depending on the selection screen value..

now for that i have used the following query


    SELECT SPMON VKORG VTWEG VKBUR PKUNAG SPART  FROM S975 
            INTO TABLE IS975 FOR ALL ENTRIES IN IKN
            WHERE  SSOUR = '' AND VRSIO = '000' 
           AND SPMON IN MON AND SPTAG = '00000000' 
           AND SPWOC = '000000' AND SPBUP = '000000' AND VKORG IN VKORG
          AND VTWEG IN VTWEG AND VKBUR IN VKBUR and PKUNAG = IKN-KUNNR .

now it is taking a lot of time to execute this query considering that IKN has some 30 or 40 records.. may be it is having too many primary keys but i have passed most of the primary keys in the query...

it would be apperciated if someone can help..

thanks in advance

syed

Edited by: Rob Burbank on Sep 16, 2010 11:57 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
500

I've actually done this in a previous assignment, and I think I used table VAKPA as my data source. I wouldn't use LIS/SIS tables for anything unless you're going to run in background, and the user has no knowledge or interest in how long the program takes to complete.

2 REPLIES 2
Read only

Former Member
0 Likes
501

I've actually done this in a previous assignment, and I think I used table VAKPA as my data source. I wouldn't use LIS/SIS tables for anything unless you're going to run in background, and the user has no knowledge or interest in how long the program takes to complete.

Read only

Clemenss
Active Contributor
0 Likes
500

Hi Syed,

BP is right.

Just note: The phrase "i have passed most of the primary keys in the query..." does not mean the key is used for database access: Only key field in sequence starting with the first one will result in the use of an index, I.e. if the tables index fields are A B C D E F G, use of A, AB, ABC, ... will get the index used, CDE, BCD or EFG will not use the index at all.

Regards,

Clemens