Skip to content

Add lesson 43: Capstone: troubleshooting a slow query#103

Merged
exekias merged 1 commit into
mainfrom
lesson/43-capstone-troubleshooting
Jul 15, 2026
Merged

Add lesson 43: Capstone: troubleshooting a slow query#103
exekias merged 1 commit into
mainfrom
lesson/43-capstone-troubleshooting

Conversation

@exekias

@exekias exekias commented Jul 2, 2026

Copy link
Copy Markdown
Member

Adds Capstone: troubleshooting a slow query (roadmap item 04-capstone-troubleshooting) — the new Module 10: Expert & operations.

Summary

Diagnose a slow query end to end — measure with EXPLAIN ANALYZE, read the plan, add the right index, and confirm it flipped.

Check

One query-returns check (orders-customer-index-added) — the learner adds the fixing index after diagnosing with EXPLAIN ANALYZE, verified via pg_indexes.

Verified end-to-end against a non-superuser Postgres 16. npm run lessons:validate (34/34) and next build both pass.

Part of #6

🤖 Generated with Claude Code

Part of #6

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
learn-postgres Ready Ready Preview Jul 15, 2026 9:14am

@exekias

exekias commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@copilot update seeding on this lesson so the query is even slower, do a 10x on number of rows

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@copilot update seeding on this lesson so the query is even slower, do a 10x on number of rows

Done — seed.sql now generates 3,000,000 rows (generate_series(0, 2999999)), up from 300,000. Updated all the matching row-count references in lesson.mdx too (example EXPLAIN plan, interpretation text, and the selectivity callout). Committed in 8ce3f7c.

@exekias
exekias force-pushed the lesson/43-capstone-troubleshooting branch from f348edc to c6b0ce2 Compare July 15, 2026 09:16
@exekias
exekias merged commit dd078a7 into main Jul 15, 2026
5 checks passed
@exekias
exekias deleted the lesson/43-capstone-troubleshooting branch July 15, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants