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 two weathervanes on one roof pointing opposite ways, one in vermilion

Task Manager Update Speed: Why the CPU Graph Looks Stuck

November 26, 2019
Pinal Dave
SQL Tips and Tricks
SQL CPU, SQL Scripts, Windows

Task Manager update speed controls how often the CPU graph moves. When it is set to Paused, the graph freezes and a normal server can look like it has a CPU problem. This post shows the fix and a five second test in T-SQL that tells you whether the graph is alive.

Read More
Gouache painting of an empty tray beside a vermilion crate packed with nails on a shop counter

Locally Aggregated Rows: Why a Columnstore Scan Shows Zero

November 25, 2019
Pinal Dave
SQL Performance
ColumnStore Index, Execution Plan, SQL Scripts

A columnstore scan shows zero actual rows when it aggregates rows itself, and the rows sit in the locally aggregated rows property. A tested demo on 1,000,000 rows shows 0 actual rows and 1,000,000 locally aggregated rows. The post also covers a scan that really is empty, and what STATISTICS IO counts.

Read More
A multi-hole planting tool and a single-hole dibber offer two ways to process a row

How to Disable Batch Mode in SQL Server? – Interview Question of the Week #252

November 24, 2019
Pinal Dave
SQL Interview Questions and Answers
ColumnStore Index, SQL Index, SQL Performance, SQL Scripts, SQL Server

My immediate reaction was why would you disable batch mode in SQL Server when it is really is an awesome feature for performance

Read More
Gouache painting of a clear glass measuring jug of water on a veranda rail beside a small stone and a folded cloth

STATISTICS TIME and IO: Turn Them On for Every SSMS Query

November 23, 2019
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio, SQL Shortcut, SQL Statistics

To get STATISTICS TIME and IO for every query, tick two boxes in the SSMS options once instead of typing SET STATISTICS in each window. This post builds a small demo, reads the output line by line, shows that a SELECT and an UPDATE both report their cost, and explains which windows the option affects.

Read More
Gouache painting of a tangled old thread spool beside a fresh vermilion spool on a sewing table

Procedure Recompilation: Force a New Plan in SQL Server

November 22, 2019
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Scripts, SQL Stored Procedure

Procedure recompilation builds a new plan without changing the procedure. A tested demo compares EXEC with WITH RECOMPILE and sp_recompile on a skewed table, with 100,089 reads on a stale plan and 348 on a fresh one. It also shows that sp_recompile removes every cached plan of the procedure.

Read More
Gouache painting of two wheelbarrows by a pile of bricks, one with a single brick and one stacked full in vermilion

Row Mode vs Batch Mode: Measuring the Speed Difference

November 21, 2019
Pinal Dave
SQL Performance
ColumnStore Index, Compatibility Level, Execution Plan, SQL Scripts

A fair test of row mode vs batch mode changes only the execution mode. This post uses a query hint to force row mode at the same compatibility level, checks that both modes return the same rows, and times five runs of each on a three million row table. It also shows a query where batch mode gains nothing.

Read More
Gouache painting of a wheelbarrow with a full vermilion crate of apples and a single apple on a plate behind

Batch Mode on Rowstore: A Simple Example in SQL Server

November 18, 2019
Pinal Dave
SQL Performance
ColumnStore Index, Compatibility Level, Execution Plan, SQL Scripts

Batch mode on rowstore lets SQL Server process rows in groups, even when the table has no columnstore index. This post builds a million row table, reads the execution mode of each plan operator, and flips four switches to show when you get batch mode and when you don’t. It also answers why a plan can stay in row mode.

Read More
Previous 1 … 55 56 57 58 59 60 61 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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