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 row of closed cloth-bound journals on a shelf, one pale journal leaning forward with a red ribbon bookmark.

Query Store Quiz: Where Is Last Week’s Slow Query?

January 30, 2012
Pinal Dave
SQL Puzzle
Execution Plan, Query Store, SQL Performance, SQL Server 2022

This Query Store Quiz starts with a slow query from last week and a plan cache that restarted empty. The answer is Query Store, which keeps plans and run times inside the database. A tested T-SQL script finds the query, its plan and its duration.

Read More
An old paraffin lamp beside a new rechargeable lantern on a porch step

T-SQL Features Added in Recent Versions

June 5, 2011
Pinal Dave
SQL Tips and Tricks
Compatibility Level, JSON, SQL Function, SQL Server, SQL Server 2022

T-SQL features added in recent SQL Server versions shorten common date, comparison, string, and JSON patterns when deployed deliberately.

Read More
Four pale ceramic bowls in two pairs, three empty and the front-right bowl filled with blue pebbles.

IS DISTINCT FROM: Compare Nullable Values Without Sentinel Values

March 17, 2011
Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Scripts, SQL Server, SQL Server 2022

IS DISTINCT FROM compares nullable values without inventing a sentinel. Test two NULLs, one NULL and changed values, then use the predicate to find transitions that ordinary equality can miss.

Read More
A half-mown lawn at dusk, the push mower parked where the last stripe ended, a red cloth on its handle.

Resumable ADD CONSTRAINT in SQL Server 2022: Pausing a Primary Key Build

October 26, 2010
Pinal Dave
SQL Tips and Tricks
Primary Key, SQL Constraint and Keys, SQL Index, SQL Server, SQL Server 2022

Use resumable ADD CONSTRAINT in SQL Server 2022 to pause a key build, inspect progress, resume safely, and understand abort behavior.

Read More
Gouache painting: two identical long dough logs lie parallel on a floured counter, each sliced into rounds of equal width

DATE_BUCKET: Align 15-Minute Windows With an Origin

October 21, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Server, SQL Server 2022

DATE_BUCKET uses an origin to align reporting windows. Keep width, unit and origin explicit while checking timestamps around each boundary.

Read More
Gouache painting: two long wooden boards lie parallel

JSON_ARRAY: Choose Whether NULL Elements Are Included

March 19, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL Server 2022

JSON_ARRAY constructs typed array text. Choose whether missing inputs disappear or remain JSON null placeholders before relying on positions.

Read More
A wooden toy train with its colored carriages uncoupled and laid in a straight line on the floor, engine at the front.

STRING_SPLIT and Its Ordinal Column

February 10, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server, SQL Server 2022, SQL String

STRING_SPLIT and its ordinal column preserve token positions when you request the third argument and sort by ordinal in SQL Server.

Read More
Previous 1 … 3 4 5 6 7 Next
  • Books
  • Testimonials
  • Privacy Policy

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