Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit of measurement for Duration column in SQL Profiler

What is the unit of the Duration column in SQL Profiler? I thought it was milliseconds but in the following Profiler row I found it contradicting with start and end time:

spid=163     duration=11310646 starttime=2010-04-06 17:45:24.480 endtime=2010-04-06 17:45:35.790 reads=152 writes=2 cpu=16 eventclass=12 textdata= DELETE FROM dbo.[Icon] WHERE Id = 20087  

FYI, I am using SQL Server 2008.

like image 965
Mubashar Avatar asked Apr 07 '10 05:04

Mubashar


People also ask

What is the unit of duration in SQL Profiler?

The SQL Server Profiler graphical user interface displays the Duration column in milliseconds by default, but when a trace is saved to either a file or a database table, the Duration column value is written in microseconds.

What is duration in SQL?

A duration is a positive or negative number representing an interval of time. Labeled durations The form a labeled duration is as follows: function-invocation 1 ( expression ) constant column-name variable YEAR YEARS MONTH MONTHS DAY DAYS HOUR HOURS MINUTE MINUTES SECOND SECONDS MICROSECOND MICROSECONDS.

What is Profiler in SQL Server?

SQL Server Profiler is an interface to create and manage traces and analyze and replay trace results. Events are saved in a trace file that can later be analyzed or used to replay a specific series of steps when diagnosing a problem. SQL Trace and SQL Server Profiler are deprecated. The Microsoft. SqlServer.

How do I sort SQL Profiler?

On the Events Selection tab, click Organize Columns. In the Organize Columns dialog box, select one column by which you want to group and aggregate the displayed trace events. Click Up to move the column name under Groups. You can use the Up and Down buttons to rearrange the remaining columns under Columns if needed.

What is the default unit for duration column in SQL Server Profiler?

According to the documentation (for SQL Server Profiler 2016) the default unit for the Duration column is milliseconds. Show values in Duration column in microseconds Displays the values in microseconds in the Duration data column of traces. By default, the Duration column displays values in milliseconds.

What is the CPU unit of SQL profiler?

SQL Profiler CPU / duration units. Beginning with SQL Server 2005, the server reports the duration of an event in microseconds (one millionth, or 10 -6 of a second) and the amount of CPU time used by the event in milliseconds (one thousandth, or 10 -3 of a second). In SQL Server 2000, the server reported both duration and CPU time in milliseconds.

Why is duration column in microseconds in SQL Server 2005?

Even in SQL Server 2000, the server reported both duration and CPU time in milliseconds. In SQL Server 2005 and later, the SQL Server Profiler graphical user interface displays the Duration column in milliseconds by default, but when a trace is saved to either a file or a database table, the Duration column value is written in microseconds.

Is SQL Server 2017 profiler duration displayed as milliseconds or microseconds?

I found in SQL Server 2017, that duration showed as milliseconds in the Profiler view, but when I exported to a table it showed in microseconds. A bit confusing at first. Thanks for contributing an answer to Stack Overflow!


1 Answers

I found the answer here. It says

In SQL Server 2005 and later, the SQL Server Profiler graphical user interface displays the Duration column in milliseconds by default, but when a trace is saved to either a file or a database table, the Duration column value is written in microseconds

I was watching them after saving the trace file in database.

like image 77
Mubashar Avatar answered Oct 04 '22 08:10

Mubashar