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 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
A figure pushing a loaded red handcart from a smooth lane onto a new stretch of rough cobbles, slowing at the seam.

Finding Regressed Queries in Query Store After a Deployment

November 20, 2019
Pinal Dave
SQL Performance
Execution Plan, Query Store, SQL CPU, SQL Server

Find regressed queries in Query Store using weighted before-and-after duration and CPU, then compare plans and changed procedure text.

Read More
An allotment plot with its gate open, older lettuce rows and a new row of seedlings inside one fence

Granting Read Access to One Schema With GRANT SELECT ON SCHEMA

November 19, 2019
Pinal Dave
SQL Tips and Tricks
Schema, SQL Login, SQL Server, SQL Server Security

Use GRANT SELECT ON SCHEMA for focused read access, test a loginless user, and check ownership chains and table-level DENY behavior.

Read More
Previous 1 … 135 136 137 138 139 140 141 … 843 Next
  • Books
  • Testimonials
  • Privacy Policy

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