04-07-2006 5:34 AM
Hello everybody!
Recently,my colleague has programmed a report about reading data from table GLFUNCA,and its speed is very slowly and exceeded limited time sometimes .
Excuse me?
how to use INDEX and VIEW TO accelerate it?
pls supply my helpful solutions.
Thanks!
Best wishes!
04-07-2006 6:08 AM
Hi,
Use following index fields in the sequence given below in your where clause.
RACCT Account number
RFAREA Functional Area
RBUSA Business Area
You can use empty ranges for the index fields if they are not available.
Also, avoid negative conditions in WHERE clause as it bypasses the INDEX structure.
You can always use FM
RFC_READ_TABLE.
Hope it helps.
Regards,
Shashank
04-07-2006 5:37 AM
if any view is present for this table, u can use it.
for creation of index, initially, take those fields which ur using in ur where condition & create an index for these fields. U can use this index in ur where condition & the data retrieval will be fast.
04-07-2006 5:39 AM
Hi,
Please check your SELECT statement to find out what are the columns being used in the WHERE clause. Then go to SE11 and find out if there are indexes on those columns.
If Indexes don't exist then you can create indexes on those columns, which might improve the performance.
However, there might be other areas also, where the performance can be improved. Do a run time analysis / trace and figure which part of the program is taking maximum time.
Regards,
Ravi
Note : Please mark the helpful answers
04-07-2006 6:08 AM
Hi,
Use following index fields in the sequence given below in your where clause.
RACCT Account number
RFAREA Functional Area
RBUSA Business Area
You can use empty ranges for the index fields if they are not available.
Also, avoid negative conditions in WHERE clause as it bypasses the INDEX structure.
You can always use FM
RFC_READ_TABLE.
Hope it helps.
Regards,
Shashank
04-07-2006 6:11 AM
HI AUTUMN,
Welcome to SDN!!
this table will alwayz result in perfomance issue.May i know wat data u r fetching from this table so tat i can tell you the other alternatives..
Cheers,
Abdul Hakim
04-07-2006 6:41 AM
Hi Abdul Hakim:
Part of code list below,it will exceed time once run them.
data: gf2 like table of glfunca.
CONCATENATE '00' rbukrs INTO rassc1 .
rbukrs1 = rassc+2(4).
SELECT *
FROM glfunca
INTO TABLE gf2
WHERE ryear = 2005
AND rbukrs IN (rbukrs,rassc+2(4))
AND rassc IN (rbukrs1,rassc1 )
AND ( ( rbukrs = rbukrs1 AND rassc <> rassc )
OR ( rbukrs = rbukrs AND rassc <> rassc1 ) )
AND hsl <> 0
AND poper = 11
AND racct IN ('0001212000','0001214000','0001280101','0001281199',
'0001400012','0001400032','0002112000','0002114000')
04-07-2006 6:45 AM
hi autumn,
may i know what data you are looking exactly from this table?
Cheers,
Abdul Hakim
04-07-2006 7:26 AM
Dear Abdul Hakim:
For example:
A company BUKRS = '8088' ,and its trade partner is '8056'
and vice versa.
I want to fetch all data where (bukrs = '8088' and rassc = '008056')
OR( bukrs = '8056' and rassc = '008088').
Do you understand my means?
04-07-2006 7:33 AM
hi autumn
i understand your scenario.
i know tat the table which you are using now will create lots of performance issue.I have faced the similar scenario before in my project.
So if you tell what data you need from this table like document no,fiscal year,comp.code etc then i can tell you the best alternative.
Hope i am very clear...
Cheers,
Abdul Hakim