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 -Select single statement -CKIS table

Former Member
0 Likes
860

Hi,

Here is the statement it is taking us > 3mnts for this statement execution for a single record extraction.

How can we over come this in a report?

SELECT SINGLE WRTFW_KPF FROM CKIS

INTO V_TEMP

WHERE KALNR = T_KEKO-KALNR

AND KALKA = T_KEKO-KALKA

AND KADKY = T_KEKO-KADKY

AND TVERS = T_KEKO-TVERS

AND BWVAR = T_KEKO-BWVAR

AND KKZMA NE 'X'

AND KSTAR = '510060'.

regards

Praveen

Message was edited by:

PRAVEEN s

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
769

try passing even LEDNR & BZOBJ fields in the where condition...

if u can't then u need to create a index for all the fields used in where condition..

award points and close duplicate threads.

6 REPLIES 6
Read only

Former Member
0 Likes
770

try passing even LEDNR & BZOBJ fields in the where condition...

if u can't then u need to create a index for all the fields used in where condition..

award points and close duplicate threads.

Read only

Former Member
0 Likes
769

Hi Praveen,

try to select with the whole Key with LEDNR BZOBJ.

instead of KKZMA NE 'X' you can use KKZMA = space.

Hope it helps.

Regards, Dieter

Read only

Former Member
0 Likes
769

HI Praveen,

I think its not the select single statement that is taking too much time, but keeping it inside a loop makes it take loger time.

Remove the select single from inside the loop and use for all entries instead.

Regards,

ravi

Read only

0 Likes
769

Hi All,

thank you for your advises.

I will let you know the results soon.

Regards

Praveen

Read only

0 Likes
769

Hi,

I resolved my issue by following the Index.

SELECT SINGLE WRTFW_KPF FROM CKIS

INTO V_TEMP

WHERE LEDNR = '00'

AND BZOBJ = '0'

AND KALNR = T_KEKO-KALNR

AND KALKA = T_KEKO-KALKA

AND KADKY = T_KEKO-KADKY

AND TVERS = T_KEKO-TVERS

AND BWVAR = T_KEKO-BWVAR

AND KKZMA EQ SPACE

AND KSTAR = '510060'.

Now it is super fast..

Thank you..

Praveen

Read only

0 Likes
769

Are you sure BZOBJ will always be '0'? It's '2' in our system.

Rob