Grant Fritchey (1/7/2008)
You just have to keep the tests honest. I wasn't counting icons and going "Oooh, it's faster." In the simple tests, both processes had a table scan. The one that did not also have to perform a join against data missing statistics was faster.But those were simple tests. I'm setting up something a bit more comprehensive and including a table of numbers in the test.
For the IN( UDF ) alternative, the table being queried (hosts/udf) did not have a table scan if the identifying column (hostid/seq) was indexed. The table the UDF created had a table scan but it only has a handful of rows.