← All Learning Paths

Database Performance Engineer

Find the queries that hurt before users do: index selectivity, covering indexes, query plans, buffer pools, and slow-query triage from EXPLAIN to zero-downtime indexing.

technicalintermediate6 nodes12.42h total

Path overview

数据库性能问题的第一现场永远是查询计划。本路径以索引选择性为纲,串起覆盖索引、缓冲池与 N+1 问题,再用 PostgreSQL 与 MySQL 的真实慢查询案例演练分诊流程,收尾于零停机索引工作流。

The first crime scene of database performance is always the query plan. This path uses index selectivity as the spine, covers covering indexes, buffer pools, and N+1, then drills triage on real PostgreSQL and MySQL cases.

  1. Reconstruct the reasoning behind "How to Fix Deep Pagination Performance" by tracing "Measure the degradation curve" to the failure it prevents in database systems.

    Completion criteria: Record a short walkthrough of "How to Fix Deep Pagination Performance" with timestamps at "Measure the degradation curve" and "Design the cursor around sort stability", plus the commit that applies it.

    Next step: Speed Up Slow Queries with SQL Indexes

    ⏱ 1h

  2. Run "Identify a slow query on a large table, analyze its execution plan, and add the correct" from "Speed Up Slow Queries with SQL Indexes" and confirm the documented result "Shows 'Seq Scan on orders' with actual time ~8000ms, rows removed by filter: 4998000, rows".

    Prerequisites: How to Fix Deep Pagination Performance

    Completion criteria: Run the steps through "Identify a slow query on a large table, analyze its execution plan, and add the correct", paste the command output, and mark the line that matches "Shows 'Seq Scan on orders' with actual time ~8000ms, rows removed by filter: 4998000, rows"; then rerun with one parameter changed.

    Next step: Add PostgreSQL Slow Query Logging

    ⏱ 0.5h

  3. Run "Queries over 500 ms appear in the PostgreSQL log with duration and statement text." from "Add PostgreSQL Slow Query Logging" and confirm the documented result "Set a slow-query threshold that captures the tail without logging every normal query, then".

    Completion criteria: Run the steps through "Queries over 500 ms appear in the PostgreSQL log with duration and statement text.", paste the command output, and mark the line that matches "Set a slow-query threshold that captures the tail without logging every normal query, then"; then rerun with one parameter changed.

    Next step: Create a Database Index Without Downtime

    ⏱ 0.5h

  4. Carry out "Create a Database Index Without Downtime" on a database project, pausing at the "Measure the query and baseline: Capture the query plan, latency, and rows scanned for the" step to verify "The build completes without blocking writes and the duration fits the operational window.".

    Prerequisites: Add PostgreSQL Slow Query Logging

    Completion criteria: Record the state "Measure the query and baseline: Capture the query plan, latency, and rows scanned for the" at the verification step, then paste the output of "The build completes without blocking writes and the duration fits the operational window." that proves it.

    Next step: Find Queries Without a Usable Index

    ⏱ 1h

  5. Build "Find Queries Without a Usable Index" for database code and verify [{query:q1,covered:true,candidateIndex:null},{query:q2,covered:false,c against both samples.

    Prerequisites: Create a Database Index Without Downtime

    Completion criteria: Submit a solution for "Database Performance Engineer" that passes both samples ({queries:[{id:q1,table:orders,where:[customer_id],orderBy:[c to [{query:q1,covered:true,candidateIndex:null},{query:q2,cover) and attach the failing case you fixed.

    Next step: Capstone: Database Performance Engineer

    ⏱ 0.42h

  6. Deliver the "Build a Connection Pool Manager" blueprint with "Idle queue" working and "Health probe" recorded as evidence.

    Prerequisites: Create a Database Index Without Downtime, Find Queries Without a Usable Index

    Completion criteria: Run the project's test command for "Build a Connection Pool Manager", paste the passing output, and attach the acceptance note for "Idle queue" with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h