cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

View Vs Join

Former Member
0 Likes
3,366

Dear Experts,

What is the best way of improving the performance in a selection, VIEW(creating a DB View) or JOIN (Joining the DB Tables)?

Thanks,

Bala

View Entire Topic
Former Member
0 Likes

creating a VIEW without a doubt will be faster than the runtime JOIN created by a SELECT stmt. Obcourse, the benefits in terms of performance will be obvious if you are accessing large number of records otherwise the a normal JOIN stmt will serve the purpose.

ChristianFi
Active Participant
0 Likes

Why would a view be faster than a join?

Isn't a view not exactly the same?

Christian

Former Member
0 Likes

Hi,

I am not sure whether I have understood ur question or not. But for example, you are joing two tables and storing result in a view. For further operation, you can use this view instead of firing query on two tables, directly to the database. Also, whatever changes you make to database are reflected in the underlying view as well. so u cam have latest data also.

Former Member
0 Likes

Hi Kavya!

Your statement "you are joing two tables and storing result in a view" needs a bit of elaboration. Views do not store data. The data stays in the tables. As per SAP documentation <b>"The data of a view is derived from one or more tables, but not stored physically"</b>. It is accessed at runtime from these underlying tables.

As far as the performance issues are concerned, the point has already been made that performance depends on indexes, where clause, select statement etc.

Regards