Performance Tuning · PostgreSQL
Advanced Query Refactoring
An eight-week deep program for senior practitioners who want to refactor large query sets — set-based rewrites, materialised view strategy, and discipline around testing.
About this cohort
Refactoring SQL at scale is mostly judgment about what to leave alone. Across eight weeks you will work through three substantial refactors of inherited code: a reporting query that grew arms over five years, a paginated listing that quietly N+1s itself, and a stored procedure that nobody is sure is still called. We pair each refactor with a measurable benchmark and a rollback note. We also dedicate two sessions to materialised views — when they earn their cost, when they hide problems, and how to schedule refresh without surprising downstream consumers.
Inclusions
- Three guided refactors against synthetic but production-shaped code
- Two sessions dedicated to materialised view strategy
- Pair-rotation reviews each week with a different cohort member
- Benchmark-and-rollback template for every change
- Code-review criteria checklist for SQL pull requests
- Reading list on set-based thinking and procedural traps
- Capstone refactor presentation to mentors in week eight
By the end you can
- 01 Refactor a long-lived reporting query with measurable confidence
- 02 Decide whether a materialised view is the right tool in a given situation
- 03 Lead a code review on a SQL change in your own team
Programme lead
Lee Min-jae
Program Director and former platform reliability engineer. He runs the pacing of every cohort and keeps the curriculum honest about what fits in six weeks.
Common questions
From the cohort
-
The materialised view sessions reframed how I think about reporting freshness. Less dogma, more measurement.
Min ParkMin Park
Platform engineer · logistics provider 4.8/5
-
Eight weeks is honest about the depth needed. I appreciated that the cohort did not pretend it could happen in three.
Ji-wonJi-won