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 pears spread evenly across a market table with one vermilion pear in the middle

Nonclustered Primary Key Test: Last Page Insert Waits

May 11, 2020
Pinal Dave
SQL Performance
Primary Key, SQL Constraint and Keys, SQL Identity, SQL Wait Stats, Testing

A nonclustered primary key test shows whether a heap fixes last page insert waits. On SQL Server 2025 it doesn’t, because the key index still rises. A lane layout that spreads the inserts removes the latch wait, and the post shows the cost of that layout.

Read More
Gouache painting of an empty wooden pier ending in a lamp post, small boats bunched around its end and a small vermilion buoy

OPTIMIZE_FOR_SEQUENTIAL_KEY: Test the Last Page Insert Fix

May 6, 2020
Pinal Dave
SQL Performance
Primary Key, SQL Identity, SQL Server 2019, SQL Wait Stats, Testing

OPTIMIZE_FOR_SEQUENTIAL_KEY is an index option that targets last page insert contention. This post tests it with 32 connections that insert into a clustered identity key, with the option off and on. The option changes the kind of waiting, and the post shows how to decide whether it helps your table.

Read More
Illustrated cover: Last Page Contention

SQL SERVER – Last Page Insert PAGELATCH_EX Contention Due to Identity Column

May 5, 2020
Pinal Dave
SQL Performance
Primary Key, SQL Constraint and Keys, SQL Identity, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Wait Stats, Testing

Today’s goal is to understand what is the Last Page Insert PAGELATCH_EX Contention Due to Primary Key. Let us start understanding it together.

Read More
Gouache painting of two pottery benches, one cluttered with kept clay scraps and one swept clean beside a vermilion bucket

Recovery Model Insert Test: FULL vs SIMPLE Under Load

May 4, 2020
Pinal Dave
SQL Performance
Best Practices, SQL Backup and Restore, SQL Log, SQL Wait Stats, Testing

A recovery model insert test compares FULL and SIMPLE under a load of 16 connections. The log written is almost the same in both, and the elapsed time depends more on the server than on the model. The real difference is when the log can be reused, and this post shows that step by step.

Read More
Gouache painting of a line of small wooden carts waiting at a narrow hopper, the first one vermilion

Insert Workload Waits: WRITELOG and PAGELATCH_EX

May 2, 2020
Pinal Dave
SQL Performance
Best Practices, SQL Log, SQL Scripts, SQL Wait Stats, Testing

Insert workload waits come down to two names, WRITELOG and PAGELATCH_EX. This post runs 16 connections that insert one row at a time and reads their waits with a tested script. It explains what each wait means and where to look for a fix.

Read More
Title card: WAIT_ON_SYNC_STATISTICS_REFRESH

SQL SERVER – Resolve WAIT_ON_SYNC_STATISTICS_REFRESH Wait Type

January 23, 2020
Pinal Dave
SQL Performance
SQL Server Management Studio, SQL Statistics, SQL Wait Stats

During Comprehensive Database Performance Health Check I recently faced a brand new wait type WAIT_ON_SYNC_STATISTICS_REFRESH.

Read More
Gouache painting of a mountain stream blocked by one large vermilion stone with water backing up behind it

Session Wait Stats: Find the Query Behind a Wait Type

October 26, 2019
Pinal Dave
SQL Performance
SQL DMV, SQL Scripts, SQL Server, SQL Wait Stats

Session wait stats tell you which session produced a wait type, and the input buffer tells you which query that session ran. This post shows how to see who waits right now, how to read the wait history of each session, and how to join them to the query text. It also explains the THREADPOOL wait.

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

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