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
Gouache painting of a tortoise leaving a long winding trail in the sand with a small vermilion dot nearby

Slowest Cached Queries in SQL Server: Time, Reads and Plan

December 7, 2020
Pinal Dave
SQL Performance
Execution Plan, SQL DMV, SQL Scripts

To find the slowest cached queries in SQL Server, rank each statement by its average elapsed time and keep its plan beside it. This post builds a small workload, reads sys.dm_exec_query_stats with the plan, and shows why a database filter on the sql text hides every ad hoc query.

Read More
Gouache painting of a hose watering a vermilion pot beside three potted plants against a pale wall

sp_updatestats and Disabled Indexes: What Gets Updated

December 4, 2020
Pinal Dave
SQL Performance
SQL Index, SQL Scripts, SQL Statistics

sp_updatestats and disabled indexes: the procedure updates statistics on disabled nonclustered indexes and skips a table whose clustered index is disabled. This post proves both, times the cost of disabled indexes against dropped ones on a million rows, and generates a targeted update that skips them.

Read More
A knife block with five large knives, beside one small pot holding all the smaller utensils bunched together.

Top N Plus Others: Grouping the Rest Into One Row

December 3, 2020
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Group By, SQL Scripts, SQL Server, SQL Top

Create top N plus others summaries with deterministic category ranking, one remainder total, stable labels, and explicit display ordering.

Read More
infinite loop

Infinite Loop – SQL in Sixty Seconds #144

December 2, 2020
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Scripts, SQL Server

Lots of people wrote feedback about it and wanted me to explain in this video so I have built this new Video where I discuss Infinite Loop.

Read More
A relined cabinet remains distinct from drawers that retain their earlier linings.

SQL SERVER – Change Database and Table Collation

December 1, 2020
Pinal Dave
SQL Tips and Tricks
SQL Collation, SQL Scripts, SQL Server

To Change Database collation, I separate its default from existing character-column settings. The customer moved from case-insensitive to case-sensitive behavior.

Read More
Gouache painting of a water wheel at a stream mill with a single vermilion bucket among gray ones

WHILE 1 = 1 Loop in T-SQL: Run Forever, Stop Safely

November 30, 2020
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Scripts, SQL Server

A WHILE 1 = 1 loop never ends on its own, so every one needs a planned exit. This post builds a once-a-second sampler with three ways out, a stop flag, a round limit and a time limit, then shows how to stop a loop from a second window and what the recursion limit does.

Read More
query shortcuts

Efficiency Trick – Query Shortcut – SQL in Sixty Seconds #143

November 27, 2020
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Server Management Studio

I have built a new SQL in Sixty Seconds video which describes how Query Shortcut works and how we can change them. Let us learn today.

Read More
Previous 1 … 82 83 84 85 86 87 88 … 843 Next
  • Books
  • Testimonials
  • Privacy Policy

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