When to use a View instead of a Table?

前端 未结 8 1272
没有蜡笔的小新
没有蜡笔的小新 2020-12-04 07:02

When should a View actually be used over an actual Table? What gains should I expect this to produce?

Overall, what are the advantages of using a view over a table?

8条回答
  •  孤街浪徒
    2020-12-04 07:13

    You should design your table WITHOUT considering the views.
    Apart from saving joins and conditions, Views do have a performance advantage: SQL Server may calculate and save its execution plan in the view, and therefore make it faster than "on the fly" SQL statements.
    View may also ease your work regarding user access at field level.

提交回复
热议问题