‎2008 Nov 27 6:36 AM
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
‎2008 Nov 27 6:39 AM
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.
‎2008 Nov 27 6:39 AM
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
‎2008 Nov 27 9:15 AM
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
‎2008 Nov 27 6:39 AM
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.
‎2008 Nov 27 6:40 AM
Check all your statements performance from SE30 or ST05 transactions.
‎2008 Nov 27 6:41 AM
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
‎2008 Nov 27 6:43 AM
Hi,
Put all the fields in same order which r in data base table.Try to use all the Key-fields in selection.
‎2008 Nov 27 9:21 AM
Hi Prasanna,
If there is two tables than go for 'FOR ALL ENTRIES' otherwise follow as AD said.
With luck,
Pritam.
‎2008 Nov 27 9:27 AM
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.