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

View Performance Issue

Former Member
0 Likes
1,244

Hi All

We have created a zview which combines vbrk & vrpma tables, but the performance(response time) of the view is not good as it has millions of records. what can be done to the view to increase performance ? we have a situation where we cannot go without view !

Thanks in advance !

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
966

I don't thin that buffering so big view is good solution. Moreover vbrk table is changed very often - so buffering the view will make no sense.

Check if your joins conditions are useing keys or indexes.

BR< Jacek

Message was edited by: Jacek Slowikowski

7 REPLIES 7
Read only

Former Member
0 Likes
966

Pass mandatory fields as conditions

Read only

0 Likes
966

Hi Ashok,

Thanks for your reply, we have already specified join conditions while creating the view. How can we improve the table performance ?? does buffering the view will help the case. the view has approximately 13 crore records !

Thanks

Srikanth

Read only

0 Likes
966

Hi Srkanth,

The tables you are using are big and contain transaction data, so buffering is not an option.

Part of your difficulty is that the document number field in VRPMA is not at the top of the key field list, so the join to create the view is inefficient. Could you create another index for VRPMA on document number?

Why is the view necessary at all? Can the business requirement be met via a BW or other custom solution.

John Armytage

Read only

Former Member
0 Likes
967

I don't thin that buffering so big view is good solution. Moreover vbrk table is changed very often - so buffering the view will make no sense.

Check if your joins conditions are useing keys or indexes.

BR< Jacek

Message was edited by: Jacek Slowikowski

Read only

Former Member
0 Likes
966

Compare your view with standard SAP view VBRP_VRPMA. The tables aren't exactly the same, but should give you an idea of how to construct your view.

If the view is OK, what does you select look like?

Rob

Read only

0 Likes
966

Hi all,

Thank you very much for your thoughtful inputs ! actually report is taking indefinite time when retrieving records from the view.

Here is the processing block which is taking a long time

select distinct vbeln fkart vtweg knumv fkdat kunrg sfakn knuma

into table i_man_accr2

from zvbrkvrpma

for all entries in i_doc_flow

where ( fkart eq 'ZCB4' or fkart eq 'S2' or fkart eq 'S1' )

and vbeln eq i_doc_flow-vbeln

and vtweg eq p_vtweg.

does selecting fields from vbrk will help avoid taking view at all into consideration??

Thanks in advance !

Srikanth

Read only

0 Likes
966

Hi Srikanth,

Based on the sample code, you do not need a view at all since all the fields come from VBRK, so processing should be:

Select vbeln fkart vtweg knumv fkdat kunrg sfakn knuma

into table i_man_accr2

from vbrk

for all entries in i_doc_flow

where ( fkart eq 'ZCB4' or fkart eq 'S2' or fkart eq 'S1' )

and vbeln eq i_doc_flow-vbeln

and vtweg eq p_vtweg.

You do not need DISTINCT as the data comes from one table. This is a reason why the code was taking such a long time as it was retrieving the same VBRK data over and over again.