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: 

select query

Former Member
0 Kudos

Hello friends,

I have a small confusion with select statement ....

in select query single table with more fields

two select queries with each with less fields each select query from two tables

which one is best in performance wise.......

Advance Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

A select query single table with more fields is always a better option.

Try to avoid as too many selects in your program. Try to restrict the program execution as much as possible in application server.

Too many database selects, would lead to many database calls, which is a big performance issue.

Thanks & Regards,

Navneeth K.

8 REPLIES 8

Former Member
0 Kudos

select query with single table more field is very effective

use various conditions in that like

1> keep the fields in series as they appear in table

2> use more no of key fields in where clause

3>use for all entries condition

0 Kudos

Hello,

ok , as above mentioned .........the first 1 is ok in the second case

we are unable to use keyfields in where condition if we go single table with more fields...then

any other way

Advance Thanks

Former Member
0 Kudos

Hi,

A select query single table with more fields is always a better option.

Try to avoid as too many selects in your program. Try to restrict the program execution as much as possible in application server.

Too many database selects, would lead to many database calls, which is a big performance issue.

Thanks & Regards,

Navneeth K.

GauthamV
Active Contributor
0 Kudos

Check all your statements performance from SE30 or ST05 transactions.

Former Member
0 Kudos

Hello,

Accessing a table only once in your program untill and unless with no options in suggested.

Use Select Single: when you define all the keys in where condition while fetching data.

Otherwise use: select UPTO 1 ROWS.

Hope this helps.

Thanks,

Jayant

Former Member
0 Kudos

Hi,

Put all the fields in same order which r in data base table.Try to use all the Key-fields in selection.

Former Member
0 Kudos

Hi Prasanna,

If there is two tables than go for 'FOR ALL ENTRIES' otherwise follow as AD said.

With luck,

Pritam.

JozsefSzikszai
Active Contributor
0 Kudos

For me your requirement is not really clear... No one can give you right answer without knowing the tables, you want to select from, and without knowing the selection fields you have. All the above answers are simply "blind shots" and some of the statements are wrong.