I have created a couple of scalar functions on my SQL-server express. They are used/called by an Excel plugin.
Is it possible to somehow get a counter to se how often a function has been called? Purpose it to find out which functions are popular and which are not. Even nicer would be if one could set a time span for the counter and thus being able to answer questions like: How often has function xy been used last week?
You might be able to get a vague idea by running
From a quick test this end though if the function is invoked in a RBAR manner
the
usecountsonly increments once per query not once per function call. And you would not be able to get any indication of usage over time. Theusecountsis uses since the plan was cached.