I have written two stored procedures one in VB.NET (CLR object) and other in SQL.I want to compare execution time of both the stored procedures,to accomplish this I m firing following query
SELECT @AverageTSQLCPUTime = ISNULL((SUM(STATICS.total_worker_time)/SUM(STATICS.execution_count)),0),
@AverageCLRCPUTime = ISNULL((SUM(STATICS.total_clr_time)/SUM(STATICS.execution_count)),0)FROM sys.dm_exec_query_stats STATICS
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS SQLTEXT
inner join sys.all_objects ALLOBJECTS on SQLTEXT.objectid =
where ALLOBJECTS.name = 'TestStoredProcedureName';
query runs for SQL stored procedure,but I don't get any results for CLR storedprocedure, bcos there is no query plan entry for CLR stored procedure in sys.dm_exec_query_stats.
So how can I find execution time for CLR objects?????????????