Execution times differ radically between runs

When I execute the code that is used in my CycleTime VDS, it executes in ~20 seconds. However, when I query the VDS via “select * from CycleTime” , it takes more than 2 minutes to execute. It looks like they both use the same reflections. Can you help me understand why this is happening?CycleTimeQuery.zip (1.8 MB)
Reference.zip (2.1 MB)

Has anyone else seen similar behavior? I’m running the SQL used to create a VDS and it executes as expected, however when I query the VDS itself the query takes minutes to complete.