This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A line of hilltop beacon fires along a coast at dusk, one beacon in the middle dark and unlit.

Heartbeat Gaps: Finding Missing Check-Ins With LAG

June 28, 2022
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Monitoring, SQL Scripts, SQL Server

Detect missing check-ins with LAG, report closed heartbeat gaps, and find silent or never-seen sources using an explicit UTC tolerance.

Read More
Date Variable

Performance Troubles – Function on Date Variable – SQL in Sixty Seconds #192

January 18, 2022
Pinal Dave
SQL Video
SQL DateTime, SQL Function, SQL in Sixty Seconds, SQL Performance

However, I have a really good reason to use that. Today we are going to discuss Performance Troubles – Function on Date Variable.

Read More
Optimize DATE

Optimize DATE in WHERE Clause – SQL in Sixty Seconds #189

December 29, 2021
Pinal Dave
SQL Video
SQL DateTime, SQL in Sixty Seconds, SQL Performance

During Comprehensive Database Performance Health Check, I often get questions about how to Optimize DATE in the WHERE Clause.

Read More
current time zone

Get Current Time Zone – SQL in Sixty Seconds #187

November 23, 2021
Pinal Dave
SQL Video
SQL DateTime, SQL in Sixty Seconds, SQL Scripts, SQL Server

Lots of people often ask me how to get the current time zone in SQL Server when I am working on Comprehensive Database Performance Health Check.

Read More
Current fabric profiles are inspected beside separate preserved seasonal layers.

SQL SERVER – List All Available TimeZone

October 29, 2021
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts, SQL Server

sys.time_zone_info lists timezone names and their current offsets. My SQL Server 2019 environment returned 141 rows.

Read More
Gouache painting of identical stepping stones stretching into the distance from one small vermilion marker stone.

Unix Timestamp in SQL Server: Converting Seconds and Milliseconds Both Ways

October 20, 2021
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

A Unix Timestamp counts seconds or milliseconds since 1 January 1970 UTC. This post converts it to datetime2 and back on SQL Server 2025, shows why datetime2(3) keeps the milliseconds, how to pass the year 2038 limit and how time zones and dates before 1970 behave.

Read More
Gouache painting of a cut tree stump with rings and a vermilion pin at the center

When a Table Was Created: Find It With Metadata and Traces

October 11, 2021
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Extended Events, SQL Scripts, SQL Server, SQL Trace

To find when a table was created, read create_date from sys.tables. This post adds the default trace and an Extended Events session for the question of who created it, and tests what a rename or an ALTER does to the date.

Read More
Previous 1 2 3 4 5 … 29 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com