Article Library, Page 5
Every Red9 article in one place, most recently updated first. Written by the senior DBAs who do the work.
- articles
- 220
- categories
- 6
All Articles
Client Result · SQL Server Performance TuningHow We Made a Third-Party App's Query 961 Times FasterA slow call inside a vendor application went from 94 seconds to 98 milliseconds. We could not change the app, so we tuned a cursor, an index and a subquery.
Guide · SQL Server Performance TuningWhy Your SQL Server Column Design Could Be Costing You 20% of Your CPU PowerA single SQL Server column mistake cost 15–20% CPU. Learn how right-sizing NVARCHAR(max) + adding indexes quickly delivered big performance gains.
Guide · SQL Server TipsOracle Database (19c 23ai): A C-Level Overview for 2025What changed from Oracle 19c to 23c that a CTO should care about: support timelines, AI features, and whether an upgrade is worth the disruption.
Client Result · SQL Server Performance TuningHow One Index Tuning Pass Made 21 Queries Up to 51x FasterAfter a large index cleanup, the 21 most improved queries ran 6.6x to 51x faster. Here is how we compared the same hour before and after to prove it.
Guide · SQL Server Migrations & UpgradesThe CTO How-to Guide to SQL Server Migration: A Decision FrameworkA practical guide for CTOs on how to migrate SQL Server. Covers risk management, compliance, hardware aging, hidden costs, and upgrade strategy.
Guide · SQL Server Migrations & UpgradesThe Complete SQL Server Migration Strategy GuideComplete SQL Server migration strategy guide for CTOs and IT Directors. Learn decision frameworks, implementation phases, testing strategies & case studies.
Guide · SQL Server TipsWhy Shrinking SQL Server Databases Is Almost Always a Terrible IdeaShrinking a SQL Server database fragments your indexes and tanks performance, then it grows right back. What to do instead when you actually need space.
Guide · SQL Server SecurityHow to Identify and Fix Orphaned Users in SQL Server (and Why It Matters)Restored a database and users can’t log in? You’ve got orphaned users. Find and fix them fast with one T-SQL script - no guesswork, no drama.
Guide · SQL Server TipsWhy Setting Up Right SQL Job Owner Matters?The wrong Agent job owner causes silent failures. Set jobs to sa or a dedicated account to fix permissions, tighten security, and stop random breakage.
Guide · SQL Server Health CheckSQL Server Database AssessmentsBring your data to Red9 and ensure that your SQL Server infrastructure on-premises or in the cloud is deployed in a way that is optimal for your needs.
Client Result · SQL Server Performance TuningHow Three Small Changes Made a Slow Query 6x FasterRemoving a function from a WHERE clause and replacing two temp tables with CTEs cut a stored procedure from 1,881 ms to 295 ms.
Client Result · SQL Server Performance TuningHow We Made 3 Slow Stored Procedures Up to 5x FasterTuning three slow stored procedures cut average duration from 6,753 to 3,815 ms, 9,432 to 1,876 ms, and 17,553 to 7,957 ms.
Client Result · SQL Server Performance TuningHow One Index Made a Frequently Run Procedure 3x FasterOne added index made a frequently run SQL Server stored procedure almost three times faster and cut its disk reads elevenfold.
Client Result · SQL Server Performance TuningHow We Made 3 Slow SQL Queries Up to 41x FasterTwo new indexes and a temp-table-to-CTE rewrite sped up three SQL Server queries: 164 ms to 4 ms, 43 ms to 21 ms, and 1,075 ms to 134 ms.
Client Result · SQL Server Performance TuningHow a Cursor Change and One Index Made a Query 8x FasterA FAST_FORWARD cursor, a table variable, and one new index cut a stored procedure from 180 ms to 23 ms and disk reads from 21,737 to 1,271.
Client Result · SQL Server Performance TuningHow Two Indexes Made a CPU-Heavy Procedure 4x FasterTwo new indexes cut a CPU-heavy stored procedure from 142 ms to 32 ms, CPU time from 157 ms to 31 ms, and disk reads from 12,805 to 266.
Client Result · SQL Server Performance TuningHow We Boosted SQL Performance by 40xRevising a stored procedure that overused index scans cut it from 40,000 ms to under 1,000 ms and logical reads from 687,157 to 90.
Client Result · SQL Server Performance TuningHow Four Views Made a Stored Procedure 11x FasterFour views and a trimmed EXISTS clause cut a stored procedure from 122,332 ms to 10,705 ms and disk reads from 72.9 million to 881,626.
Client Result · SQL Server Performance TuningHow Turning a Scan Into a Seek Made a Query 51x FasterA new index turned a clustered index scan into a seek, cutting a deadlocking procedure from 8,656 ms to 171 ms and reads from 313,137 to 5,337.
Client Result · SQL Server Performance TuningHow Indexes Made a Constantly Running Procedure 43x FasterNew indexes cut a stored procedure that ran several times a minute from 44,177 ms to 1,037 ms and disk reads from 686,140 to 4,084.
Client Result · SQL Server Performance TuningHow Rewriting a Busy Stored Procedure Made It 111x FasterCode changes to a stored procedure that ran hundreds of times per hour cut disk reads from 53,116 to 191 and CPU time from 3,411 ms to 24.6 ms.
Client Result · SQL Server Performance TuningHow Splitting One Subquery Made a Procedure 108x FasterSplitting a subquery into four parts with UNION and replacing ISNULL in the WHERE clause cut a procedure from 31,025 ms to 287 ms.
Client Result · SQL Server Performance TuningHow Splitting Four JOINs With UNION Made a Query 45x FasterSplitting a SELECT with four JOINs into two SELECTs with UNION cut a stored procedure from 30,682 ms to 685 ms and reads 693x.
Client Result · SQL Server Performance TuningHow UNION ALL Made a Timing-Out Procedure 38x FasterRewriting a stored procedure with a second SELECT and UNION ALL cut it from 38,000 ms to 1,000 ms and disk reads from 687,475 to 314.
Client Result · SQL Server Performance TuningHow Widening One Index Made a Stored Procedure 227x FasterReplacing one index with a wider one cut a heavily called stored procedure from 227 ms to 1 ms and disk reads from 2,496 to 8 per run.
Client Result · SQL Server Performance TuningHow Reading Fewer Rows Made a Billing Procedure 9x FasterRefactoring a billing stored procedure to read fewer rows cut it from 34,256 ms to 3,859 ms and disk reads from 3,298,493 to 147,424.
Guide · SQL Server TipsWhy Should You Care About CLR Integration in SQL Server?SQL Server CLR integration lets you run .NET code in your database. Check whether it's enabled and review the permissions before using it.
Guide · SQL Server Performance TuningTop 10 SQL Server Performance Tuning MistakesThe 10 performance mistakes we see most on SQL Server, from bad indexes to wrong MAXDOP, and the quick fix for each. How many are you making?
Guide · SQL Server Health CheckHow to Check MaxDOP in SQL Server and Set It for Optimal PerformanceThe right MaxDOP stops parallel queries from choking your CPU. Microsoft's formula, how to check your current setting, and when you should change it.
Guide · SQL Server Migrations & UpgradesTwo Most Important Decisions in Disaster Recovery – RPO and RTORPO and RTO define how much data you can lose and how fast you can recover. Learn how to set them, test them, and avoid DR planning mistakes.
Guide · SQL Server Performance TuningUntrusted Foreign Keys and Constraints Can Degrade Your SQL Server PerformanceUntrusted foreign keys and check constraints quietly block the optimizer from skipping work. How to find them, and the command that re-trusts them.
Guide · SQL Server Performance TuningStored Procedures and RECOMPILE Option: When and Why to Use ItExplore the WITH RECOMPILE option, its impact on performance, and how to identify stored procedures that use it. Learn when to use this option.