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
1,109

Dear All

I want to fetch some records from table FAGLFLEXA based on GL codes, company code, year, period, ledger and profit center. After that I have to classify them based on the document type which is not there in this table . I have to fetch it from table BKPF based on the document number. Now please tell me which is the best way to get better performance for the pgm.

1.Fetch data from faglflexa based on all conditions using index for gl & period. Then take document type from BKPF using for all entries in faglflexa. now map the doc type to faglflexa using read.

or

2.Create a view joining faglflexa & bkpf and fetching data from view.

or

3.using join in select statement in pgm.

If using view or join what is the order of fields for the where condition in select statements.

Pls tell me which will give best performance or is there any best method.

Pls note that there will be lakhs of records which will satisfy the whole conditions.

Regards

Sathar

8 REPLIES 8
Read only

Former Member
0 Likes
965

The JOIN should give the best performance. The order shouldn't matter.

Rob

Read only

0 Likes
965

Hi Rob.

Thx for ur reply. Will join in report give a better performance than a view. Can u pls explain.

Rgds

Sathar

Read only

0 Likes
965

A view is implemented by a JOIN, so there's not much difference.

Your main performance drag will be in bringing the large amount of data back to the application. There's not much you can do about that.

Rob

Read only

Former Member
0 Likes
965

Hi,

Do like this,

First create one view for these two tables in se11 then u can write select statement on this view at the report level.

or

first select statement in FAGLFLEXA in the report,

then,

if not l_FAGLFLEXA[] is initial.

select from BKPF for all entries in l_FAGLFLEXA[]

where = common fields.

endif.

reward points if useful,

seshu.

Read only

0 Likes
965

Hi seshu,

Thx for ur reply. But pls tell me which method will be better in performance pont of view. Note that my query will fetch around 1-2 lakhs of records in average.

Rgds

sathar

Read only

0 Likes
965

Hi,

create view in se11 then write a select statement on that,

it'll improve your performance.

reward points if useful,

seshu.

Read only

Former Member
0 Likes
965

I would go with the first option of yours.

Get data from FAGLFLEXA table.

Using the data from FAGLFLEXA table get the data from BKPF table.

This i would prefer than going for joins or database views.

This would definitely be faster than the JOINS and database views.

I would totally agree with what Rob said. Sometimes the queries would bring several lacs of records to the application and you cant help without it.

Reward points if found helpful.

Thanks,

Balaji

Read only

Former Member
0 Likes
965

> This would definitely be faster than the JOINS and database views

'definitely' is not argument! When I read 'definitely' in the forum, then the argument very often wrong.

That is also here the case. Joins are generally faster than FOR ALL ENTRIES!

And View are dictionary defined joins, now performance difference.#

Siegfried