Views can be used to optimize complex queries. As we can store result of some set of calculations in view and can join our queries with view.
Here all complex calculations will be performed by view. That will make the query lightweight and faster.
To illustrate :
If you have a record with update track in child table and you want to get each time latest updated record. For large table query for getting latest updates of a record will take time.
So make this query faster we can create a view separately for getting latest updates. Then can join this view with main table. It will faster your query.
Here all complex calculations will be performed by view. That will make the query lightweight and faster.
To illustrate :
If you have a record with update track in child table and you want to get each time latest updated record. For large table query for getting latest updates of a record will take time.
So make this query faster we can create a view separately for getting latest updates. Then can join this view with main table. It will faster your query.
No comments:
Post a Comment