Lost and found — calling a system function on per row basis

Those of you who have tried using user-define scalar functions probably found out that they are painfully slow. On the other hand, system scalar functions are freakishly fast. Have you ever wondered why? The very reason is because system functions are called once per query, not per row — yes, this is a huge oversimplification, [...]

Lost and found — sp_monitor

For those of you who do not spend evenings reading Book Online, there is a little known, but useful stored procedure called sp_monitor. If you ever wanted to get a quick impression of how the SQL Server is going in terms of CPU, I/O or network activity, just execute it: EXEC sp_monitor; —– last_run current_run [...]