How about this option:
GO
declare @count int=0;
while(@i<10000)
begin
execute SPone_optimized @param='value1';
select @i+=1;
end
GO
----- for the SP that is before optimize
declare @count int=0
while(@i<10000)
begin
execute SPone @param='value1';
select @i+=1;
end
GO
SET STATISTICS TIME OFF;
this will deliver results as follows for each ececution:
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 11 ms.
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”