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 3341950
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:46:54+00:00 2026-05-18T00:46:54+00:00

I have the following options Use the ‘Include Client Statistics’ option in SSMS .

  • 0

I have the following options

  1. Use the ‘Include Client Statistics’ option in SSMS . (I take the ‘Wait time on server replies’ to be the time taken by the stored procedure)
  2. Capture the start and end time and take the diff.

This is what i do ,

DECLARE @startTime DATETIME
    SET @startTime = GETUTCDATE()

   EXEC MyStoredProc

  PRINT 'Execution Time : ' +  CAST(DATEDIFF(ms,@startTime,GETUTCDATE()) AS NVARCHAR(20)) + ' milliseconds'

But I sometimes see a big difference between the values I get from both the methods for the same stored procedure that I am beginning to think that I am doing something wrong here. Which method should I use? or is there a better way to time the stored proc?

  • 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-18T00:46:55+00:00Added an answer on May 18, 2026 at 12:46 am

    Make sure you run the following to get a good baseline everytime:

    CHECKPOINT
    GO
    DBCC DROPCLEANBUFFERS
    GO
    DBCC FREEPROCCACHE
    GO
    

    Stolen from here.

    Otherwise you might be pulling cached data.

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

Sidebar

Related Questions

I have been advised to use the following options with GCC, as it helps
Im including the popular file jquery.form.js. I have the following: var options = {
I have following code for alertdialog: AlertDialog.Builder helpBuilder = new AlertDialog.Builder(this); helpBuilder.setTitle(Options); helpBuilder.setMessage(Choose Your
I have the following rewrites in my .htaccess: Options +FollowSymLinks RewriteEngine On RewriteRule \.(css|jpe?g|gif|png)$
I have the following script: (function($) { $.fn.easyPaginate = function(options){ var defaults = {
I have a following configuration: IIS 7.5 Website A - Authentication: all options disabled,
I have the following grammar: grammar bxk; options { language=CSharp3; } // start rule
I have the following jquery code: jQuery(function(){ jQuery(select#rooms).change(function(){ var options = ''; jQuery.getJSON(/admin/selection.php,{id: jQuery(this).val(),
I have the following h:selectOneRadio : <h:selectOneRadio id=#{prefix}_rating value=#{examinationPanel.tempResult} > <f:selectItems value=#{examinationPanel.options}></f:selectItems> </h:selectOneRadio> And
In my forum I have a BB code to display youtube videos. following options

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.