Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6687435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:17:18+00:00 2026-05-26T05:17:18+00:00

I have created a couple of scalar functions on my SQL-server express. They are

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:17:19+00:00Added an answer on May 26, 2026 at 5:17 am

    You might be able to get a vague idea by running

    SELECT usecounts
    FROM sys.dm_exec_cached_plans 
    CROSS APPLY sys.dm_exec_sql_text(plan_handle) 
    WHERE sys.dm_exec_sql_text.objectid=object_id('YourFunction') 
    

    From a quick test this end though if the function is invoked in a RBAR manner

    SELECT dbo.YourFunction(X)
    FROM T
    

    the usecounts only increments once per query not once per function call. And you would not be able to get any indication of usage over time. The usecounts is uses since the plan was cached.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created couple of jobs in SQL Server Agent. Now I need to
I have created a couple of PowerShell scripts which configure computers used in a
I have created a couple of simple functions in VB.NET that simply return a
I have created a couple of java working sets for a project in my
I have created a couple of activities and stored them as XAML. Opening them
I have created a page in facebook. I have added a couple of tabs
Though I have created couple of applications in Android , I have not much
I have created an application that launches a couple of child processes using fork
I have created a program in Java using eclipse that contains a couple of
I have created a UserControl, and added a couple of custom routed events. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.