执行两个视图是否存在性能差异?如果审计包含数百万条记录,那么通过过滤视图内的数据或使用视图外的where语句可以获得性能提升吗?
select * from vwTestPerformance where AuditId = 5708701
select * from vwTestPerformanceFilteredInside
create view vwTestPerformance
as
select * from Audit
go
create view vwTestPerformanceFilteredInside
as
select * from Audit where AuditId = 5708701
go