‎2007 Jan 31 4:15 PM
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
‎2007 Jan 31 4:26 PM
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.
‎2007 Jan 31 4:26 PM
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.
‎2007 Jan 31 4:28 PM
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
‎2007 Jan 31 4:30 PM
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
‎2007 Jan 31 4:44 PM
Hi All,
thank you for your advises.
I will let you know the results soon.
Regards
Praveen
‎2007 Jan 31 4:50 PM
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
‎2007 Jan 31 5:01 PM
Are you sure BZOBJ will always be '0'? It's '2' in our system.
Rob