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

Former Member
0 Likes
662

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
617

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'.

6 REPLIES 6
Read only

Former Member
0 Likes
618

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'.

Read only

Former Member
0 Likes
617

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

Read only

Former Member
0 Likes
617

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

Read only

Former Member
0 Likes
617

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

Read only

anversha_s
Active Contributor
0 Likes
617

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

Read only

Former Member
0 Likes
617

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