• I made that into a permanent table and populated dates of birth all the way back to 01/01/1900 and then ran the Itvf against the computed column. The execution plans where identical below is th stats. This was against approx. 40,000 rows. I'm not sure exactly what it means though as I'm still learning this stuff.

    SET STATISTICS IO ON

    SET STATISTICS TIME ON

    SELECT *

    ,AGE = convert(int,DATEDIFF(d, t.Birthdate, getdate())/365.25)

    FROM dbo.testfunc1 t

    ------------------Above is Calculated Field----------

    ------------Below IVT Function-----------------------

    SELECT

    tf.Birthdate,

    ba.Age

    FROM

    TestFunc1 tf

    cross apply (SELECT Age FROM dbo.BirthAge(tf.Birthdate))ba

    I got this SQL Server parse and compile time:

    CPU time = 0 ms, elapsed time = 0 ms.

    SQL Server Execution Times:

    CPU time = 0 ms, elapsed time = 0 ms.

    SQL Server parse and compile time:

    CPU time = 4 ms, elapsed time = 4 ms.

    SQL Server Execution Times:

    CPU time = 0 ms, elapsed time = 0 ms.

    SQL Server Execution Times:

    CPU time = 0 ms, elapsed time = 0 ms.

    (40025 row(s) affected)

    Table 'TestFunc1'. Scan count 1, logical reads 68, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

    (1 row(s) affected)

    SQL Server Execution Times:

    CPU time = 15 ms, elapsed time = 284 ms.

    (40025 row(s) affected)

    Table 'TestFunc1'. Scan count 1, logical reads 68, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

    (1 row(s) affected)

    SQL Server Execution Times:

    CPU time = 31 ms, elapsed time = 282 ms.

    SQL Server parse and compile time:

    CPU time = 0 ms, elapsed time = 0 ms.

    SQL Server Execution Times:

    CPU time = 0 ms, elapsed time = 0 ms.

    ***SQL born on date Spring 2013:-)