select * from ( select some data from some tables to get about 300 rows ) x where dbo.udf_countBusinessDays(x.date,getdate()) > 14I figured that the sub-select would return about 300 rows and then the UDF would take no time at all. However, it takes the same amount of time as using the UDF in the where clause of a query without the sub-query (1 min. +). The query plans for both are virtually identical.