05-02-2006 3:46 PM
Hi Everyone
I understand that generally using the 'FOR ALL ENTRIES' option is more efficient than using JOINS within my code. However, even though they use inner joins, are Views inherently more efficient than using joins used in a program. If they are, are they also more efficient than using 'FOR ALL ENTRIES' too? My specific example involves joining VBAK and VBAP. I figure I have 3 options:
1. Write a selec statement joining the two tables on VBELN
2. Use the pre-defined view VIVEDA that does the same
3. Write a select with just VBAK into an int. table and then write another select using this table with a FOR ALL ENTRIES.
Which is the best option?
Kind regards
Andy
05-02-2006 3:59 PM
Hi,
i will suggest option 3, that will be faster.use for all entries. since view VIVEDA is also join.
Regards
vijay
05-02-2006 3:50 PM
In this case I would say that SELECTIING FROM THE VIEW should be efficient, as internally the view will be created efficiently.
Regards,
Ravi
Note : Please mark the helpful answers
05-02-2006 3:59 PM
Hi,
i will suggest option 3, that will be faster.use for all entries. since view VIVEDA is also join.
Regards
vijay
05-02-2006 4:11 PM
Hi Andrew,
Best option is: using the view VIVEDA.
As it is built upon / doing the same task of getting data from VBAK and VBAP.
Regards,
Raj
05-02-2006 4:13 PM
Hi,
Use the option 3.
If there r more than 10000 records SELECT FOR ALL ENTRIES is used. Performance wise SELECT FOR ALL ENTRIES is better to use than a view.
Regards,
Amit Mishra