snippetMinor
How can I benchmark the performance of UDFs to figure out which one is faster?
Viewed 0 times
canthefigureudfsfasteroneperformancebenchmarkhowwhich
Problem
Basically I have two scalar UDFs that output the same data, one that uses a cursor and one that uses a recursive CTE. I want to determine which one should be used and discard the other; I'd prefer to make this decision based on actual performance numbers. I'm also curious how much of a difference there is between the two.
How can I benchmark the performance of these UDFs to figure out which one is faster?
How can I benchmark the performance of these UDFs to figure out which one is faster?
Solution
The SQL Profiler, execution plan, IO/Cpu statistics are your best friend at checking the performance of your code. You will see if there are any differences in performance between the 2 versions of functions.
In this question - Tuning exercises - you can find some basic and advanced references about tuning.
In this question - Tuning exercises - you can find some basic and advanced references about tuning.
Context
StackExchange Database Administrators Q#718, answer score: 7
Revisions (0)
No revisions yet.