SQLServerCentral Article

How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory

When a SQL Server Express-based factory app started crawling, the culprit wasn’t hardware or network — it was a decades-old WHILE loop migrated from C/C++ to SQL. This real-world story breaks down how procedural habits, memory grants, and lack of window functions nearly derailed a production floor.

5 (6)

You rated this post out of 5. Change rating

2025-07-28

14,242 reads

SQLServerCentral Article

We Gave Memory-Optimized Tables a Hash Lookup — Then Tried Pattern Matching Instead

Introduction It was the week before Black Friday — the biggest online ad rush of the year. Our US-based ad-tech platform was gearing up for an insane traffic spike. Hundreds of real-time campaigns were about to go live across multiple brands, each with thousands of user sessions flowing through our system. Every incoming user impression […]

4.83 (6)

You rated this post out of 5. Change rating

2025-07-22

2,304 reads

SQLServerCentral Article

When INCLUDE Columns Quietly Inflate Your Transaction Logs

In this article, I wanted to test a common assumption we DBAs make – that adding INCLUDE columns to indexes is harmless. I created a FULL recovery test database with a realistic wide Orders table containing extra large VARCHAR columns to simulate an ERP workload. I ran updates and measured transaction log backup sizes before and after adding INCLUDE columns to a nonclustered index. The results shocked me. The update without INCLUDE columns generated a 10 MB log backup, while the same update with INCLUDE columns produced over 170 MB – a 17x increase in log volume. I explain why this happens: INCLUDE columns are physically stored in index leaf rows, so updates affecting them write bigger log records. I also clarify that updating key columns generates even more log than INCLUDE updates because it involves row movement (delete + insert), but INCLUDE updates still cost more log than if those columns weren’t indexed at all. The takeaway is clear – INCLUDE columns are powerful, but they silently increase transaction log generation, impacting backup sizes, replication lag, and DR readiness. Always measure their real cost before deploying to production.

5 (3)

You rated this post out of 5. Change rating

2025-07-18

660 reads

SQLServerCentral Article

Unmasking CXPACKET and CXCONSUMER in SQL Server: What Your Execution Plan Isn’t Telling You

This article dives deep into cxpacket and cxconsumer in sql server, explaining how to simulate each, when they appear, and why they matter. Using live execution plans, wait monitoring, and worker thread diagnostics, we uncover how uneven parallelism triggers thread sync waits—and how SQL Server sometimes hides real issues behind innocent-looking CXCONSUMER waits. Includes step-by-step queries, tuning tips, and a real-world scenario where repartition streams quietly ruined performance.

5 (5)

You rated this post out of 5. Change rating

2025-07-07

3,385 reads

SQLServerCentral Article

The Hidden Cost of MAXDOP: CPU Spikes, Query Slowdowns, and What We Learned

Misusing MAXDOP can silently kill performance across your SQL Server. In this deep dive, we uncover how one bad query caused CPU meltdown, run real-world tests, and show how tuning—not parallelism—often holds the true fix.

4.5 (4)

You rated this post out of 5. Change rating

2025-06-23

3,853 reads

SQLServerCentral Article

How to Safely Remove a SQL Server Data File Without Downtime

Learn how to safely remove a SQL Server .ndf data file without any downtime using DBCC SHRINKFILE (EMPTYFILE). This hands-on tutorial walks through real-world Azure-based setup, data redistribution, and storage cleanup — ideal for DBAs managing enterprise SQL Server environments.

5 (3)

You rated this post out of 5. Change rating

2025-05-16

2,293 reads

Blogs

Fabric as a Data Mesh Enabler: Rethinking Enterprise Data Distribution

By

For decades, enterprises have approached data management with the same mindset as someone stuffing...

Truncate Table Pitfalls

By

 Truncate Table Pitfalls Truncating a table can be gloriously fast—and spectacularly dangerous when used carelessly....

dataMinds Connect 2025 – Slides & Scripts

By

You can find all the session materials for the presentation “Indexing for Dummies” that...

Read the latest Blogs

Forums

DBCC CHECKIDENT

By Steve Jones - SSC Editor

Comments posted to this topic are about the item DBCC CHECKIDENT

Distributed Availability Group Health: T-SQL and Zabbix

By Pablo Echeverria

Comments posted to this topic are about the item Distributed Availability Group Health: T-SQL...

extended events to spy on our server between 8 and 9 am

By stan

Hi, our peer who owns a remote mysql server from which we extract warehouse...

Visit the forum

Question of the Day

DBCC CHECKIDENT

What is returned as a result set when I run this command without a new seed value?

See possible answers