Home > T-SQL > SQL SERVER – Time Tickers @@TIMETICKS – @SQLServer

SQL SERVER – Time Tickers @@TIMETICKS – @SQLServer


A tick is an arbitrary unit for measuring internal system time. There is usually an OS-internal counter for ticks; the current time and date used by various functions of the OS are derived from that counter.

How many milliseconds a tick represents depends on the OS. On MS Windows, there are 10,000 ticks in a millisecond.

@@TIMETICKS – It is a SQL Server system statistical function and it returns the number of microsecond per tick. The amount of time per tick is truly based of the computer. Each tick on the operating system is 31.25 milliseconds, or one thirty-second of a second.

Implementation

pic1I just got this number when I executed this query “Select @@TIMETICKS” in SSMS. Now the time for experiment. Just execute the same SQL query in your machine and paste your result in this blog comment section.

You can also learn about DateTime.Ticks Property in .NET framework.

Advertisements
Categories: T-SQL Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: