Is querying on views slower than doing one query?

前端 未结 5 767
悲哀的现实
悲哀的现实 2020-12-19 22:47

Will Mssql be even fast when I query on a view opposed to one query?

example

When I have this view:

create view ViewInvoicesWithCustomersNam         


        
5条回答
  •  醉梦人生
    2020-12-19 23:13

    Both should take almost same time.

    View here is just representation for query to be executed for data whenever View is accessed.

    There is another type of View i.e. Materialized View. This type of view has physical existance as Tables. And query (passed during view creation) is not executed while accessing this type of view. acessing from this type of view should be faster.

提交回复
热议问题