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 wheelbarrow with vermilion handles carrying a basket of fruit down an orchard row of pear trees

Multiple Aggregates in One Query: Read the Table Once

June 20, 2020
Pinal Dave
SQL Performance
SQL Index, SQL Performance, SQL Scripts

Multiple aggregates in one query read a table once, where separate subqueries read it again and again. This post measures the logical reads of two subqueries against one SELECT, uses CASE inside SUM for different filters, and shows two cases where the rewrite gains nothing or loses to an index.

Read More
Gouache painting of a wicker trunk half packed with neat folded blankets and a vermilion strap left half buckled

Kill a Running Shrink: Is It Safe to Stop DBCC SHRINKFILE?

June 4, 2020
Pinal Dave
SQL Tips and Tricks
Shrinking Database, SQL Performance, SQL Server DBCC

You can kill a running shrink with KILL and the database stays safe. This post starts a shrink on a test database, stops it from a second window, checks the data and the file afterwards, and shows that the shrink itself, not the kill, is what fragments the table.

Read More
A hand with sugar tongs dropping a sugar cube into each of a long row of teacups, the sugar bowl nearly empty.

Scalar Function Statistics With sys.dm_exec_function_stats

May 30, 2020
Pinal Dave
SQL Performance
SQL DMV, SQL Function, SQL Performance, SQL Server

Read dm_exec_function_stats to rank scalar UDF activity, inspect callers, verify collection settings, and recognize inlined work.

Read More
A woven panel and a complete replacement with an additional stripe

How to Alter Index to Add New Columns in SQL Server? – Interview Question of the Week #278

May 24, 2020
Pinal Dave
SQL Interview Questions and Answers
SQL Index, SQL Performance, SQL Scripts, SQL Server

Question: How to Alter Index to Add New Columns in SQL Server? 

Answer: It is not possible to Alter Index definition to add or remove columns.

Read More
Testing with oStress

Stress Testing with oStress – SQL in Sixty Seconds #087

May 7, 2020
Pinal Dave
SQL Video
SQL Download, SQL in Sixty Seconds, SQL Performance, SQL Server, Testing

One of the things which we cover in my  Comprehensive Database Performance Health Check is how to do Load Testing or Stress Testing with oStress.

Read More
Gouache painting of a basket of apples capped by a vermilion plank, with more apples left on the grass around it

SSMS ROWCOUNT Setting: Why Your Query Stops at 100 Rows

April 22, 2020
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Performance, SQL Server Configuration, SQL Server Management Studio

The SSMS ROWCOUNT setting limits every query in a window to a fixed number of rows, and it can change the plan as well. This post shows the effect on rows, reads and plan with a tested demo, how to check your own session and why UPDATE statements stop at the limit too.

Read More
A heavy door propped open by a red wedge that has quietly slid across the floor.

Forcing a Plan in Query Store and Checking That It Held

April 17, 2020
Pinal Dave
SQL Performance
Execution Plan, Query Store, SQL Performance, SQL Server

Use forcing a plan in Query Store with verified IDs, then audit force failures and runtime results every week so the fix stays useful.

Read More
Previous 1 … 13 14 15 16 17 18 19 … 54 Next
  • Books
  • Testimonials
  • Privacy Policy

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