在《Pro SQL Server Internals》中描述了一段SELECT * 的I/O性能。通过如下事例可知,select *的性能较差,需要避免使用。
set statistics io on
set statistics time on
select * from dbo.Employees;
select EmployeeId, Name from dbo.Employees;
set statistics io off
set statistics time off
在《Pro SQL Server Internals》中描述了一段SELECT * 的I/O性能。通过如下事例可知,select *的性能较差,需要避免使用。
set statistics io on
set statistics time on
select * from dbo.Employees;
select EmployeeId, Name from dbo.Employees;
set statistics io off
set statistics time off