Application Development 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: 

Performance in Select statement

Former Member
0 Kudos

I have to retrieve all records from VBFA table.

SELECT <fields> from VBFA into table t_vbfa.

no condition is there to place in where condition.

how can i improve the performance.

Thank you.

Lalitha

Edited by: lalitha botla on Sep 17, 2008 1:11 PM

Edited by: lalitha botla on Sep 17, 2008 1:11 PM

8 REPLIES 8

former_member755502
Participant
0 Kudos

Hi,

As you have mentioned that there is no condition for selection, in that case make sure that you don't fetch any un-necessary fields. Also, store the selection result in some internal table for further usage as executing these kind of queries (databse fetch) repeatedly is not wise.

Thank you.

0 Kudos

I am taking only required fields( only five fields ) and storing

the selection result in internal table t_vbfa.

0 Kudos

Hi Lalitha,

Instead of writing select query you can use FM SD_VBFA_SELECT, I think this would be faster compare to select query.

Just compare your report with this FM.

Thanks & Regards,

Nagaraj Kalbavi

0 Kudos

Hi,

why?

What do you think the FM is doing ? It will execute SELECT to the database.

(It may somewhat little slower if they do it in a loop)

You can't beat a SELECT like that. If you can do it in one statement - do it!

For a real boost you can have some database hints like PARALLEL or for database buffering.

but...the database has to support it, your DB server has to have enough resources and sometimes it makes

no sense to do in PARALLEL because of the tradeoff between the coordinating of parallel processes and the amount of rows to be selected.

bye

yk

Former Member
0 Kudos

better u will give blank ranges and

client as restriction parameter

0 Kudos

can you please explain me about blank ranges?

does it affect the performance?

Former Member
0 Kudos

Run it in the background. There's not much you can do.

Rob

Former Member
0 Kudos

Hi Lalitha,

use package size in select statement with appending option or in to option according to your requirement to store all the contents of vbfa table in to an internal table.

Use the following link which helps you to write a query using package size.

http://help.sap.com/saphelp_scm50/helpdata/en/fc/eb39eb358411d1829f0000e829fbfe/content.htm

Thanks,

Naveen Kumar.