Online Class • Lesson 1
Welcome to SQL Server Performance Tuning. In this first class, students will learn how performance tuning actually works
in the real world: how to define “performance,” how to measure it correctly, how to avoid guessing, and how to follow
a repeatable tuning workflow that scales from a single slow query to enterprise-wide bottlenecks.
Performance tuning is not “making SQL faster” by random tweaks. It’s a disciplined process that produces measurable improvements
and predictable results.
60–90 minutes (lecture + demo + short lab)
Performance is not a feeling. It’s a measurement.
Students often say “the database is slow,” but a performance engineer translates that complaint into evidence and metrics.
Key teaching point: A system can be “fast” sometimes and still be a performance problem if it becomes
unpredictable under real load.
SQL Server performance issues usually come from one (or more) of the categories below. In production, the winning approach
is to identify which category is dominating right now, then apply the smallest safe fix that produces measurable improvement.
Key teaching point: Performance tuning is often systems thinking.
A slow query might be caused by blocking, memory pressure, or storage—not the query text itself.
Guessing creates fragile systems and “fixes” that break later. Professional tuning is evidence-first.
A baseline answers:
If you change five things and performance improves, you don’t know why.
If you change one thing and measure, you learn and control risk.
This workflow becomes the foundation for every future lesson (indexing, execution plans, waits, troubleshooting).
Your job is not to “try fixes,” but to follow a controlled process that produces proof.
Determine which resource is the limiter:
Key teaching point: Most real production incidents require you to look at more than one layer.
Show students the difference between “guessing” and “measuring.”
If you want a simple baseline script to demonstrate “collect evidence,” use this:
-- Quick baseline snapshot (safe, read-only) SELECT GETDATE() AS captured_at, cpu_count, hyperthread_ratio, physical_memory_kb/1024 AS physical_memory_mb FROM sys.dm_os_sys_info; -- Top waits (since last restart) - basic view for class discussion SELECT TOP (15) wait_type, waiting_tasks_count, wait_time_ms, signal_wait_time_ms FROM sys.dm_os_wait_stats WHERE wait_type NOT LIKE 'SLEEP%' ORDER BY wait_time_ms DESC;
Students will capture a basic “before” snapshot of their SQL Server and store it as evidence.
Lab script (safe, read-only):
-- Lab: capture baseline evidence (safe) SELECT GETDATE() AS captured_at; SELECT cpu_count, scheduler_count, physical_memory_kb/1024 AS physical_memory_mb, sqlserver_start_time FROM sys.dm_os_sys_info; SELECT TOP (20) wait_type, wait_time_ms, waiting_tasks_count, signal_wait_time_ms FROM sys.dm_os_wait_stats WHERE wait_type NOT LIKE 'SLEEP%' ORDER BY wait_time_ms DESC;
Prompt:
“In your experience (or from what you’ve heard), when someone says ‘the database is slow,’ what do they usually mean?
Response time, timeouts, reports, app slowness, or something else? How would you turn that complaint into measurable data?”
In the next lesson, we will go deeper into Database Architecture and how SQL Server processes queries
internally (storage engine vs query processor). Once you understand what SQL Server is doing under the hood, performance
tuning becomes much easier and far more consistent.
Not a member yet? Register now
Are you a member? Login now