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
Four sorting channels deliver different-sized walnut heaps into separate compartments

Does Parallel Threads Process Equal Rows? – Interview Question of the Week #211

February 3, 2019
Pinal Dave
SQL Interview Questions and Answers
Execution Plan, Parallel, SQL Scripts, SQL Server, SQL Statistics

Do parallel threads process equal rows? Usually no, and a simple AdventureWorks query with its actual execution plan proves it in a few seconds.

Read More
Execution Plan Cost Breakdown.

SQL SERVER – Parallelism for Heap Scan

October 29, 2018
Pinal Dave
SQL Performance
Clustered Index, Parallel, SQL CPU, SQL Heap, SQL Index, SQL Scripts, SQL Server

Two DBAs asked me if their table needed a clustered index. Our conversation during a Health Check turned into a lesson on parallelism for Heap Scan.

Read More
Gouache painting of rowing boats jammed at a narrow stone arch with one vermilion boat past it

Max Degree of Parallelism for Microsoft Dynamics CRM

September 14, 2018
Pinal Dave
SQL Performance
MAXDOP, Parallel, SQL Scripts, SQL Server Configuration

Max degree of parallelism controls how many cores one query can use, and the vendor guidance for Microsoft Dynamics CRM has been 1. This post measures what parallel plans cost on a heavy and a small query. It shows a database scoped limit and the instance wide statements.

Read More
Several rows of clay discs waiting for the single working position of an arbor press

Serial Zones in Parallel Plans: Where One Thread Does the Work

July 12, 2018
Pinal Dave
SQL Tips and Tricks
Best Practices, Parallel, SQL Server

A parallel plan can still leave one core busy. See a harmless serial zone, a costly one, and how to read per-thread rows from the plan.

Read More
Six paintbrushes jammed into one small jar at once, a red brush waiting on a rag beside it

SQL SERVER – Parallel Redo on AlwaysOn Secondary – DIRTY_PAGE_TABLE_LOCK

May 24, 2018
Pinal Dave
SQL Tips and Tricks
AlwaysOn, Parallel, SQL High Availability, SQL Server, TraceFlags

Redo lag and high DIRTY_PAGE_TABLE_LOCK waits hit a client’s AlwaysOn secondary. Here is how Parallel Redo in SQL Server 2016 causes them and what to do.

Read More
Gouache painting of a wide slate blue bowl holding a cream bowl and several tiny cups, one cup vermilion

SPID, KPID and ECID in sys.sysprocesses: What They Mean

August 11, 2017
Pinal Dave
SQL Tips and Tricks
Parallel, SQL DMV, SQL Scripts, System Object

SPID, KPID and ECID are the three ID columns of sys.sysprocesses: the session, the Windows thread and the part of a parallel query. This post reads them for an idle session and for a query running in parallel, explains why KPID can be negative, and names the DMVs that give the same answers today.

Read More
Gouache painting of four wheelbarrows in parallel each carrying part of a pumpkin pile, one pumpkin painted red

How to Find Queries Running in Parallel in SQL Server

July 25, 2015
Pinal Dave
SQL Performance
Parallel, SQL CPU, SQL Scripts, SQL Server

To find queries running in parallel, read max_dop and the CPU to elapsed ratio from the query stats view, then confirm with the plan XML. This post tests both on a two million row table. It also explains why the same query stays serial until its cost passes the threshold.

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

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