Skip to content

mhoseinikh/SQL-Server-Performance-Tuning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 

Repository files navigation

SQL Server Performance Tuning β€” Case Studies & Scripts

This repository documents real-world SQL Server performance tuning work.
Each folder is a case study with:

  • A short write-up (problem β†’ analysis β†’ fix β†’ result)
  • Before/After screenshots (plans/metrics)
  • Repro and scripts used

⚠️ Run on non-production first. Review and adapt scripts to your environment.


πŸ“‚ Case Studies Overview

Here are some highlights from performance tuning cases:

Case 01 – Optimizing Heavy Queries (Running Total)

This case study explores different methods of calculating Running Totals in SQL Server and compares their performance.
Six approaches were tested, from basic JOIN and Subquery methods to more advanced techniques like Window Functions.

Execution Plans
Execution Plans

πŸ‘‰ View scripts

πŸ‘‰ Read full case study


Case 02 – Optimizing Reporting View RPT.vOrderSum

Before / After
After

πŸ‘‰ Read full case study


πŸ“‚ Archive

You can browse all case studies in the repository:

πŸ‘‰ Full Case Study Archive