Rewrite the indexes chapter as a hands-on tutorial - #1
Merged
Conversation
topics/01-indexes.md is now five numbered steps: start a Postgres lab in Docker, load a million rows and watch a seq scan, add the index, see three cases where an index does not help, and measure what indexes cost. Every step ends with a checklist. ANALYZE runs after the load so the plans are deterministic; the sample plans were copied from a real Postgres 17 run. The terminal renderer learns the conventions the chapter uses: "## Step N:" headings draw a 1 ─ [2] ─ 3 ─ 4 ─ 5 tracker, "- [ ]" items render as ☐ / ☑, **bold** spans are bold, and ```sql blocks get keyword, string, number, comment, and function colors. Bare `pgbook` now prints an ASCII wordmark with a start-here menu instead of the usage text; --help is unchanged. site/api regenerated from the topic source. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017j8szNM4ep76fVKgpoHa6A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
topics/01-indexes.mdrewritten as a five-step tutorial for a beginner DevOps reader: Docker lab, seq scan on a million rows, add the index, three cases where an index does not help, and what indexes cost. Each step ends with a checklist. Every SQL block was dry-run againstpostgres:17;ANALYZEafter the load keeps the plans deterministic.## Step N:headings draw a1 ─ [2] ─ 3 ─ 4 ─ 5progress tracker,- [ ]items render as ☐ / ☑,**bold**spans, and```sqlblocks get syntax colors (keywords, strings, numbers, comments, functions, psql meta-commands).pgbookprints an ASCII wordmark and a start-here menu.--helpis unchanged.site/apiregenerated.Test plan
go test ./...,go vet,gofmtcleango run ./tools/gensiteproduces no diff (CI freshness check)tools/serve; widest line 77 columnspostgres:17container🤖 Generated with Claude Code
https://claude.ai/code/session_017j8szNM4ep76fVKgpoHa6A