‎2006 Oct 05 11:01 AM
Hi Experts,
please suggest how to increase the performance of following select query without creating index or specifying key fields in where clause??,
SELECT fplnr ccnum autwr audat autim
INTO TABLE t_fpltc
FROM fpltc
WHERE ccins = 'GC'
AND audat LE p_rundt
AND ccpre NE 'X'.
Thanks,
harkamal
‎2006 Oct 05 11:05 AM
its ok..
but one thing u can do try to avoid <b>NE</b> it is not gud peformance wish.u search condition for equal and get same output...
SELECT fplnr ccnum autwr audat autim
INTO TABLE t_fpltc
FROM fpltc
WHERE ccins = 'GC'
AND audat LE p_rundt
AND ccpre<b> NE</b> 'X'.
‎2006 Oct 05 11:05 AM
its ok..
but one thing u can do try to avoid <b>NE</b> it is not gud peformance wish.u search condition for equal and get same output...
SELECT fplnr ccnum autwr audat autim
INTO TABLE t_fpltc
FROM fpltc
WHERE ccins = 'GC'
AND audat LE p_rundt
AND ccpre<b> NE</b> 'X'.
‎2006 Oct 05 11:05 AM
HI,
SELECT fplnr ccnum autwr audat autim
INTO CORRESPONDING FILEDS OF TABLE t_fpltc
FROM fpltc
WHERE ccins = 'GC'
AND audat LE p_rundt
AND ccpre NE 'X'.
in you table T_FPLTC, Where conditoin fields should be in sequence and also the selected fileds should be in sequence.
Regards
Sudheer
‎2006 Oct 05 11:05 AM
if you cannot create index or key fileds are also not there, then can specify the value of CCPRE = ' ' bcoz for data element CCPRE onlu two values are possible i. e. ' ' or 'X'. Instead of giving NE you can specify EQ ' '.
Best Regards,
Vibha
*Plz mark useful answers
‎2006 Oct 05 11:06 AM
Hi
I believe your statament is the best, if u want to improve the performace u should do what u wouldn't want to do: use index or key fields.
Max
‎2006 Oct 05 11:07 AM
hi,
ur code seems ok.
SELECT fplnr ccnum autwr audat autim
INTO TABLE t_fpltc
FROM fpltc
WHERE ccins = 'GC'
AND audat LE p_rundt
AND ccpre NE 'X'.
Only soncern is NE .
instead of that give EQ condiation.
rgds
anver
pls mark hlpful asnwers
‎2006 Oct 05 11:16 AM
Hi,
use dummy ranges it may improve performance to some
extent
ranges: r_FPLNR for fpltc-FPLNR
r_FPLTR for fpltc-FPLTR.
r_FPLTR-sign = 'I'.
r_FPLTR-option = 'BT'.
r_FPLTR-low = '000000'.
r_FPLTR-high = '999999'
append r_FPLTR .
clear r_FPLTR .
SELECT fplnr ccnum autwr audat autim
INTO TABLE t_fpltc
FROM fpltc
WHERE FPLNR in r_FPLNR and
FPLTR in r_FPLTR and
ccins = 'GC'
AND audat LE p_rundt
AND ccpre NE 'X'.
regards
amole