I am currently making a view to replace my current stored procedure and was wondering if there is any benefit in creating multiple views, where the fetch has to join the different views, rather than a single view where the fetch doesn’t have to use any joins.
Share
I have two point of views for this
Suppose in your application, there is something reusable which is written already in the stored proc and is reusable in another stored proc as well. So you can shift that part in the view and call the view in both stored Procedures and futher you can filter down to your desired result.
Unnecessary use of views can cause performance issues. Because views donot accept input parameters so it is going to select all matching rows depending on your join Inner/Left