dojo.md 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/courses/GENERATION_LOG.md +45 -0
- package/courses/aws-lambda-debugging/course.yaml +11 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/api-gateway-integration.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/cloudwatch-logs-basics.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/cold-start-basics.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/environment-variable-issues.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/first-debugging-shift.yaml +73 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/handler-import-errors.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/iam-permission-errors.yaml +68 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/invocation-errors.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/lambda-timeout-errors.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-1/memory-and-oom.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/async-invocation-failures.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/cold-start-optimization.yaml +76 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/dynamodb-streams-debugging.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/lambda-concurrency-management.yaml +70 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/lambda-layers-debugging.yaml +76 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/sam-local-debugging.yaml +74 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/sqs-event-source.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/vpc-networking-issues.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-2/xray-tracing.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/advanced-debugging-shift.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/container-image-lambda.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/cross-account-invocation.yaml +72 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/eventbridge-patterns.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/iac-deployment-debugging.yaml +68 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/kinesis-stream-processing.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/lambda-at-edge.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/lambda-extensions-debugging.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/powertools-observability.yaml +79 -0
- package/courses/aws-lambda-debugging/scenarios/level-3/step-functions-debugging.yaml +80 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/cost-optimization-strategy.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/expert-debugging-shift.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/incident-management-serverless.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/multi-region-serverless.yaml +67 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/observability-platform-design.yaml +71 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-architecture-design.yaml +64 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-data-architecture.yaml +66 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-migration-strategy.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-security-design.yaml +60 -0
- package/courses/aws-lambda-debugging/scenarios/level-4/serverless-testing-strategy.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/board-serverless-strategy.yaml +63 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/consulting-serverless-adoption.yaml +57 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/industry-serverless-patterns.yaml +62 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/ma-serverless-integration.yaml +75 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/master-debugging-shift.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/organizational-serverless-transformation.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/regulatory-serverless.yaml +61 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-economics.yaml +65 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-future-technology.yaml +66 -0
- package/courses/aws-lambda-debugging/scenarios/level-5/serverless-platform-design.yaml +71 -0
- package/courses/docker-container-debugging/course.yaml +11 -0
- package/courses/docker-container-debugging/scenarios/level-1/container-exit-codes.yaml +59 -0
- package/courses/docker-container-debugging/scenarios/level-1/container-networking-basics.yaml +69 -0
- package/courses/docker-container-debugging/scenarios/level-1/docker-logs-debugging.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-1/dockerfile-build-failures.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-1/environment-variable-issues.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-1/first-debugging-shift.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-1/image-pull-failures.yaml +68 -0
- package/courses/docker-container-debugging/scenarios/level-1/port-mapping-issues.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-1/resource-limits-oom.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-1/volume-mount-problems.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-2/container-health-checks.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-2/docker-compose-debugging.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-2/docker-exec-debugging.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-2/image-layer-optimization.yaml +81 -0
- package/courses/docker-container-debugging/scenarios/level-2/intermediate-debugging-shift.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-2/logging-and-log-rotation.yaml +76 -0
- package/courses/docker-container-debugging/scenarios/level-2/multi-stage-build-debugging.yaml +76 -0
- package/courses/docker-container-debugging/scenarios/level-2/network-debugging-tools.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-2/pid1-signal-handling.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-2/security-scanning-basics.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-3/advanced-debugging-shift.yaml +77 -0
- package/courses/docker-container-debugging/scenarios/level-3/buildkit-optimization.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-3/container-filesystem-debugging.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-3/container-security-hardening.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-3/disk-space-management.yaml +74 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-api-automation.yaml +72 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-daemon-issues.yaml +73 -0
- package/courses/docker-container-debugging/scenarios/level-3/docker-in-docker-ci.yaml +69 -0
- package/courses/docker-container-debugging/scenarios/level-3/overlay-network-debugging.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-3/production-container-ops.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-4/cicd-pipeline-design.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-monitoring-observability.yaml +63 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-orchestration-strategy.yaml +62 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-performance-engineering.yaml +64 -0
- package/courses/docker-container-debugging/scenarios/level-4/container-security-architecture.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-4/enterprise-image-management.yaml +58 -0
- package/courses/docker-container-debugging/scenarios/level-4/expert-debugging-shift.yaml +63 -0
- package/courses/docker-container-debugging/scenarios/level-4/incident-response-containers.yaml +70 -0
- package/courses/docker-container-debugging/scenarios/level-4/multi-environment-management.yaml +65 -0
- package/courses/docker-container-debugging/scenarios/level-4/stateful-service-containers.yaml +65 -0
- package/courses/docker-container-debugging/scenarios/level-5/board-infrastructure-strategy.yaml +58 -0
- package/courses/docker-container-debugging/scenarios/level-5/consulting-container-strategy.yaml +61 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-platform-architecture.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-platform-economics.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/container-technology-evolution.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/disaster-recovery-containers.yaml +66 -0
- package/courses/docker-container-debugging/scenarios/level-5/industry-container-patterns.yaml +71 -0
- package/courses/docker-container-debugging/scenarios/level-5/master-debugging-shift.yaml +62 -0
- package/courses/docker-container-debugging/scenarios/level-5/organizational-transformation.yaml +67 -0
- package/courses/docker-container-debugging/scenarios/level-5/regulatory-compliance-containers.yaml +61 -0
- package/courses/kubernetes-deployment-troubleshooting/course.yaml +12 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/configmap-secret-issues.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/crashloopbackoff.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/deployment-rollout.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/first-troubleshooting-shift.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/health-probe-failures.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/imagepullbackoff.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/kubectl-debugging-basics.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/oomkilled.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/pending-pods.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-1/service-not-reachable.yaml +66 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/dns-resolution-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/helm-deployment-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/hpa-scaling-issues.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/ingress-routing-issues.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/init-container-failures.yaml +63 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/intermediate-troubleshooting-shift.yaml +66 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/network-policy-blocking.yaml +67 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/persistent-volume-issues.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/rbac-permission-denied.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-2/resource-quota-limits.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/advanced-troubleshooting-shift.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/cluster-upgrade-failures.yaml +71 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/gitops-drift-detection.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/job-cronjob-failures.yaml +67 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/monitoring-alerting-gaps.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/multi-container-debugging.yaml +68 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/node-pressure-evictions.yaml +70 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/pod-disruption-budgets.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/service-mesh-debugging.yaml +64 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-3/statefulset-troubleshooting.yaml +69 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/capacity-planning.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/cost-optimization.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/disaster-recovery-design.yaml +56 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/executive-communication.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/expert-troubleshooting-shift.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/incident-management-process.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-cluster-operations.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/multi-tenancy-design.yaml +55 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/platform-engineering.yaml +59 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-4/security-hardening.yaml +58 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/behavioral-science.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/board-strategy.yaml +61 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/cloud-native-future.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/comprehensive-platform.yaml +57 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/consulting-engagement.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/industry-benchmarks.yaml +58 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/ma-integration.yaml +62 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/master-troubleshooting-shift.yaml +73 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/product-development.yaml +65 -0
- package/courses/kubernetes-deployment-troubleshooting/scenarios/level-5/regulatory-compliance.yaml +76 -0
- package/courses/mysql-query-optimization/course.yaml +11 -0
- package/courses/mysql-query-optimization/scenarios/level-1/buffer-pool-basics.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-1/explain-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +78 -0
- package/courses/mysql-query-optimization/scenarios/level-1/innodb-index-fundamentals.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-1/join-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-1/select-star-problems.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +65 -0
- package/courses/mysql-query-optimization/scenarios/level-2/buffer-pool-tuning.yaml +64 -0
- package/courses/mysql-query-optimization/scenarios/level-2/composite-index-design.yaml +71 -0
- package/courses/mysql-query-optimization/scenarios/level-2/covering-and-invisible-indexes.yaml +69 -0
- package/courses/mysql-query-optimization/scenarios/level-2/cte-and-window-functions.yaml +78 -0
- package/courses/mysql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-2/join-optimization.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-2/performance-schema-analysis.yaml +69 -0
- package/courses/mysql-query-optimization/scenarios/level-2/query-optimizer-hints.yaml +74 -0
- package/courses/mysql-query-optimization/scenarios/level-2/subquery-optimization.yaml +70 -0
- package/courses/mysql-query-optimization/scenarios/level-2/write-optimization.yaml +63 -0
- package/courses/mysql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
- package/courses/mysql-query-optimization/scenarios/level-3/connection-management.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-3/full-text-search.yaml +77 -0
- package/courses/mysql-query-optimization/scenarios/level-3/json-optimization.yaml +87 -0
- package/courses/mysql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +68 -0
- package/courses/mysql-query-optimization/scenarios/level-3/monitoring-alerting.yaml +63 -0
- package/courses/mysql-query-optimization/scenarios/level-3/online-schema-changes.yaml +79 -0
- package/courses/mysql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +83 -0
- package/courses/mysql-query-optimization/scenarios/level-3/query-profiling-deep-dive.yaml +84 -0
- package/courses/mysql-query-optimization/scenarios/level-3/replication-optimization.yaml +66 -0
- package/courses/mysql-query-optimization/scenarios/level-4/aurora-vs-rds-evaluation.yaml +61 -0
- package/courses/mysql-query-optimization/scenarios/level-4/data-architecture.yaml +62 -0
- package/courses/mysql-query-optimization/scenarios/level-4/database-migration-planning.yaml +59 -0
- package/courses/mysql-query-optimization/scenarios/level-4/enterprise-governance.yaml +50 -0
- package/courses/mysql-query-optimization/scenarios/level-4/executive-communication.yaml +54 -0
- package/courses/mysql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +67 -0
- package/courses/mysql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +60 -0
- package/courses/mysql-query-optimization/scenarios/level-4/optimizer-internals.yaml +62 -0
- package/courses/mysql-query-optimization/scenarios/level-4/performance-sla-design.yaml +52 -0
- package/courses/mysql-query-optimization/scenarios/level-4/read-replica-scaling.yaml +51 -0
- package/courses/mysql-query-optimization/scenarios/level-5/ai-database-future.yaml +45 -0
- package/courses/mysql-query-optimization/scenarios/level-5/behavioral-science.yaml +44 -0
- package/courses/mysql-query-optimization/scenarios/level-5/benchmark-design.yaml +47 -0
- package/courses/mysql-query-optimization/scenarios/level-5/board-strategy.yaml +48 -0
- package/courses/mysql-query-optimization/scenarios/level-5/comprehensive-platform.yaml +49 -0
- package/courses/mysql-query-optimization/scenarios/level-5/consulting-engagement.yaml +52 -0
- package/courses/mysql-query-optimization/scenarios/level-5/ma-database-integration.yaml +47 -0
- package/courses/mysql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +56 -0
- package/courses/mysql-query-optimization/scenarios/level-5/product-development.yaml +48 -0
- package/courses/mysql-query-optimization/scenarios/level-5/regulatory-compliance.yaml +48 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/comprehensive-database-system.yaml +70 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-ai-future.yaml +81 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-behavioral-science.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-board-strategy.yaml +77 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-consulting-engagement.yaml +61 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-industry-benchmarks.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-ma-integration.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-product-development.yaml +72 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/database-regulatory-landscape.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-5/master-optimization-shift.yaml +66 -0
- package/courses/terraform-infrastructure-setup/course.yaml +11 -0
- package/courses/terraform-infrastructure-setup/scenarios/level-1/terraform-init-errors.yaml +72 -0
- package/dist/mcp/session-manager.d.ts +7 -4
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +23 -8
- package/dist/mcp/session-manager.js.map +1 -1
- package/package.json +1 -1
package/courses/postgresql-query-optimization/scenarios/level-5/database-behavioral-science.yaml
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: database-behavioral-science
|
|
3
|
+
level: 5
|
|
4
|
+
course: postgresql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Apply behavioral science to database operations — design systems that nudge engineers toward good query practices and prevent performance anti-patterns"
|
|
7
|
+
tags: [PostgreSQL, behavioral-science, nudge-theory, developer-experience, culture, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your organization has 400 engineers writing queries against PostgreSQL.
|
|
13
|
+
Despite documentation, training, and code reviews, the same performance
|
|
14
|
+
anti-patterns keep appearing: SELECT *, missing indexes on foreign keys,
|
|
15
|
+
N+1 queries, unfiltered aggregations on large tables, and long-running
|
|
16
|
+
transactions holding locks.
|
|
17
|
+
|
|
18
|
+
You've tried traditional approaches:
|
|
19
|
+
- Wiki documentation: 15% of engineers read it
|
|
20
|
+
- Quarterly training sessions: Attendance drops 50% after first session
|
|
21
|
+
- Code review checklist: Reviewers skip database items under time pressure
|
|
22
|
+
- Slack channel for DB questions: Same 5 people answer, 10 people ask
|
|
23
|
+
|
|
24
|
+
Anti-pattern frequency (last quarter):
|
|
25
|
+
- SELECT * on tables with 50+ columns: 120 new instances
|
|
26
|
+
- Missing WHERE clause on UPDATE/DELETE: 8 incidents (3 in production)
|
|
27
|
+
- N+1 queries in new endpoints: 45 instances
|
|
28
|
+
- Queries without LIMIT on unbounded result sets: 67 instances
|
|
29
|
+
- ALTER TABLE without CONCURRENTLY on large tables: 12 instances
|
|
30
|
+
- Long transactions (>5 min) blocking autovacuum: 30 incidents
|
|
31
|
+
|
|
32
|
+
Behavioral science concepts to apply:
|
|
33
|
+
1. Choice architecture: Make the right thing the default
|
|
34
|
+
2. Nudge theory: Gentle prompts at the right moment
|
|
35
|
+
3. Feedback loops: Immediate visibility of consequences
|
|
36
|
+
4. Social proof: Show what good teams are doing
|
|
37
|
+
5. Friction: Make bad patterns slightly harder, good patterns easier
|
|
38
|
+
6. Gamification: Make query optimization engaging
|
|
39
|
+
|
|
40
|
+
The VP of Engineering says: "We can't review every query manually.
|
|
41
|
+
We need a system where engineers naturally write good queries without
|
|
42
|
+
needing a DBA to catch every mistake."
|
|
43
|
+
|
|
44
|
+
Task: Design the behavioral system for database excellence. Write:
|
|
45
|
+
the choice architecture (how to make good defaults), the automated
|
|
46
|
+
nudge system (when and how to prompt engineers), the feedback loop
|
|
47
|
+
design (showing query impact in real-time), the social proof
|
|
48
|
+
mechanisms (leaderboards, team comparisons), and the organizational
|
|
49
|
+
change management plan.
|
|
50
|
+
|
|
51
|
+
assertions:
|
|
52
|
+
- type: llm_judge
|
|
53
|
+
criteria: "Choice architecture makes good practices the default — ORM configuration defaults to safe patterns (SELECT with explicit columns, query timeouts, connection limits), migration tools default to CONCURRENTLY for index creation, CI/CD pipeline includes automatic EXPLAIN analysis that flags anti-patterns before merge, and database client libraries include built-in guardrails"
|
|
54
|
+
weight: 0.35
|
|
55
|
+
description: "Effective choice architecture"
|
|
56
|
+
- type: llm_judge
|
|
57
|
+
criteria: "Nudge system intervenes at the right moment — IDE plugins that warn about SELECT * as you type, PR bot that comments with query performance estimates, pre-deploy checks that show estimated query cost, and post-deploy dashboards that attribute latency changes to specific deployments. Nudges are informative, not blocking (most of the time)"
|
|
58
|
+
weight: 0.35
|
|
59
|
+
description: "Well-timed nudge system"
|
|
60
|
+
- type: llm_judge
|
|
61
|
+
criteria: "Feedback loops and social proof create sustainable improvement — real-time query performance dashboard per team, weekly automated reports comparing team query performance, gamification elements (query optimization challenges, leaderboards), and the change management plan addresses resistance (making it fun, not punitive) with measurable success metrics"
|
|
62
|
+
weight: 0.30
|
|
63
|
+
description: "Sustainable feedback and social proof"
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: database-board-strategy
|
|
3
|
+
level: 5
|
|
4
|
+
course: postgresql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Present database strategy to the board — frame PostgreSQL infrastructure as a strategic asset, quantify technical debt, and secure multi-year investment"
|
|
7
|
+
tags: [PostgreSQL, board-strategy, investment, technical-debt, governance, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You're the CTO presenting the database infrastructure strategy to
|
|
13
|
+
the Board of Directors at the quarterly meeting. The board includes
|
|
14
|
+
3 technical members and 4 non-technical members. You need to secure
|
|
15
|
+
approval for a $5M, 3-year database modernization program.
|
|
16
|
+
|
|
17
|
+
Company context:
|
|
18
|
+
- $200M ARR SaaS platform, 5,000 enterprise customers
|
|
19
|
+
- IPO planned in 18 months
|
|
20
|
+
- Due diligence will examine infrastructure scalability
|
|
21
|
+
- Current database: 30 PostgreSQL clusters, 50TB total
|
|
22
|
+
- 8 DBAs, $3.5M/year database infrastructure cost
|
|
23
|
+
- 3 major outages last year (total 14 hours downtime)
|
|
24
|
+
- Customer-facing latency SLA: 99.9% of requests <200ms
|
|
25
|
+
- Current achievement: 99.2% (SLA breach, contractual penalties possible)
|
|
26
|
+
|
|
27
|
+
The $5M modernization program includes:
|
|
28
|
+
Year 1 ($2M):
|
|
29
|
+
- Consolidate 30 clusters to 15 (eliminate redundancy)
|
|
30
|
+
- Implement automated query review pipeline
|
|
31
|
+
- Deploy comprehensive monitoring (pg_stat_statements, pgwatch2)
|
|
32
|
+
- Partition all tables >100M rows
|
|
33
|
+
- Upgrade all clusters to PG 16
|
|
34
|
+
|
|
35
|
+
Year 2 ($1.8M):
|
|
36
|
+
- Migrate to managed service (Aurora) for 10 clusters
|
|
37
|
+
- Implement multi-region disaster recovery
|
|
38
|
+
- Reduce DBA team from 8 to 5 (3 transition to platform engineering)
|
|
39
|
+
- Achieve 99.95% latency SLA compliance
|
|
40
|
+
|
|
41
|
+
Year 3 ($1.2M):
|
|
42
|
+
- Achieve 99.99% availability
|
|
43
|
+
- Implement auto-scaling for variable workloads
|
|
44
|
+
- Reduce infrastructure cost by 30% through optimization
|
|
45
|
+
- Full self-service database provisioning for engineering teams
|
|
46
|
+
|
|
47
|
+
Expected outcomes:
|
|
48
|
+
- Infrastructure cost: $3.5M/year → $2.5M/year by Year 3
|
|
49
|
+
- Downtime: 14 hours/year → <1 hour/year
|
|
50
|
+
- SLA compliance: 99.2% → 99.99%
|
|
51
|
+
- Engineering velocity: 40% faster feature delivery (less DB bottleneck)
|
|
52
|
+
|
|
53
|
+
Board member concerns:
|
|
54
|
+
- "Why not just move everything to the cloud and let AWS handle it?"
|
|
55
|
+
- "Can't we just hire more DBAs instead of spending $5M?"
|
|
56
|
+
- "What if we delay this until after the IPO?"
|
|
57
|
+
- "How does this compare to what our competitors are doing?"
|
|
58
|
+
|
|
59
|
+
Task: Write the board presentation narrative. Include: the strategic
|
|
60
|
+
framing (database as competitive advantage), the investment case with
|
|
61
|
+
ROI, the risk of inaction (IPO due diligence, SLA penalties, customer
|
|
62
|
+
churn), the phased execution plan, and prepared responses to the 4
|
|
63
|
+
board concerns.
|
|
64
|
+
|
|
65
|
+
assertions:
|
|
66
|
+
- type: llm_judge
|
|
67
|
+
criteria: "Strategic framing resonates with board audience — presents the database as a business asset (not just infrastructure), connects reliability to customer retention and revenue, frames the investment in context of IPO readiness, and uses business language (not technical jargon) for non-technical board members"
|
|
68
|
+
weight: 0.35
|
|
69
|
+
description: "Board-appropriate strategic framing"
|
|
70
|
+
- type: llm_judge
|
|
71
|
+
criteria: "Investment case is compelling — ROI is clearly calculated ($5M investment vs quantified returns: $1M/year cost reduction, avoided SLA penalties, reduced outage costs, IPO readiness), risk of inaction is quantified (SLA penalty exposure, due diligence failure risk, customer churn from outages), and the phased approach reduces execution risk"
|
|
72
|
+
weight: 0.35
|
|
73
|
+
description: "Compelling investment case"
|
|
74
|
+
- type: llm_judge
|
|
75
|
+
criteria: "Board concerns are addressed directly — explains why lift-and-shift to cloud isn't sufficient (still need optimization, higher cost without tuning), why more DBAs don't solve the structural problem, why delaying risks IPO timeline and increases cost, and provides competitive context. Responses are concise and business-focused"
|
|
76
|
+
weight: 0.30
|
|
77
|
+
description: "Board concerns addressed"
|
package/courses/postgresql-query-optimization/scenarios/level-5/database-consulting-engagement.yaml
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: database-consulting-engagement
|
|
3
|
+
level: 5
|
|
4
|
+
course: postgresql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Lead a database consulting engagement — assess a client's PostgreSQL infrastructure, identify optimization opportunities, and deliver a transformation roadmap"
|
|
7
|
+
tags: [PostgreSQL, consulting, assessment, transformation, roadmap, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You're a PostgreSQL consulting lead hired by a Series C fintech
|
|
13
|
+
company ($500M valuation) that's experiencing database growing pains.
|
|
14
|
+
They've doubled their engineering team to 200 in the past year, and
|
|
15
|
+
their PostgreSQL infrastructure is struggling to keep up.
|
|
16
|
+
|
|
17
|
+
Client briefing:
|
|
18
|
+
- Company: PayStream (B2B payment processing)
|
|
19
|
+
- Revenue: $80M ARR, growing 100% YoY
|
|
20
|
+
- Transaction volume: 10M transactions/day, projected 50M in 12 months
|
|
21
|
+
- Database: 8 PostgreSQL clusters, 3TB total, mix of PG 13 and PG 15
|
|
22
|
+
- Team: 2 DBAs (both joined <6 months ago), 15 backend engineers
|
|
23
|
+
- Monthly infrastructure cost: $120K (growing 20%/quarter)
|
|
24
|
+
|
|
25
|
+
Assessment findings (your first week):
|
|
26
|
+
1. Performance: 40% of API endpoints exceed 500ms P99 latency
|
|
27
|
+
2. Schema: 15 tables over 1B rows with no partitioning
|
|
28
|
+
3. Indexes: 2,000 indexes total, estimated 40% unused (wasting 400GB)
|
|
29
|
+
4. Queries: Top 50 queries consume 80% of database CPU
|
|
30
|
+
5. Configuration: All 8 clusters use identical postgresql.conf despite
|
|
31
|
+
wildly different workloads (OLTP, reporting, event storage)
|
|
32
|
+
6. Monitoring: Basic CloudWatch only — no query-level visibility
|
|
33
|
+
7. No connection pooling on 5 of 8 clusters
|
|
34
|
+
8. Backups: Daily pg_dump (takes 6 hours), never tested restoration
|
|
35
|
+
9. Version: 3 clusters still on PG 13 (EOL approaching)
|
|
36
|
+
10. No query review process — any engineer can deploy any query
|
|
37
|
+
|
|
38
|
+
The CEO says: "We're spending more on database infrastructure every
|
|
39
|
+
quarter. Our engineers complain the database is slow. Our DBAs are
|
|
40
|
+
overwhelmed. We need a plan to fix this before our Series D."
|
|
41
|
+
|
|
42
|
+
Task: Write the consulting deliverable. Include: the executive
|
|
43
|
+
assessment (current state in business terms), the prioritized
|
|
44
|
+
optimization roadmap (quick wins, medium-term, long-term), the
|
|
45
|
+
staffing and organizational recommendations, the cost projection
|
|
46
|
+
(infrastructure costs with and without optimization), and the risk
|
|
47
|
+
register (what happens if they don't act).
|
|
48
|
+
|
|
49
|
+
assertions:
|
|
50
|
+
- type: llm_judge
|
|
51
|
+
criteria: "Assessment translates technical findings into business impact — quantifies the cost of poor performance (revenue impact of 500ms latency, cost of unused indexes, risk of untested backups), prioritizes findings by business impact, and presents a clear current-state summary that a CEO can understand"
|
|
52
|
+
weight: 0.35
|
|
53
|
+
description: "Business-impact assessment"
|
|
54
|
+
- type: llm_judge
|
|
55
|
+
criteria: "Roadmap is prioritized and realistic — quick wins (drop unused indexes, deploy PgBouncer, tune top 50 queries) deliver measurable improvement in 2-4 weeks, medium-term (partition large tables, upgrade PG 13→16, implement monitoring) in 2-3 months, long-term (query review process, architecture evolution) in 6-12 months. Each phase has estimated cost savings"
|
|
56
|
+
weight: 0.35
|
|
57
|
+
description: "Prioritized optimization roadmap"
|
|
58
|
+
- type: llm_judge
|
|
59
|
+
criteria: "Staffing and cost projections are realistic — recommends DBA team growth or managed service adoption, projects infrastructure costs with optimization (reducing growth rate) vs without (linear extrapolation), and presents a compelling case for investment before Series D (database health as investor due diligence concern)"
|
|
60
|
+
weight: 0.30
|
|
61
|
+
description: "Staffing and cost projections"
|
package/courses/postgresql-query-optimization/scenarios/level-5/database-industry-benchmarks.yaml
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: database-industry-benchmarks
|
|
3
|
+
level: 5
|
|
4
|
+
course: postgresql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Design and interpret database benchmarks — create meaningful PostgreSQL benchmarks, avoid common pitfalls, and use benchmarks for capacity planning and vendor selection"
|
|
7
|
+
tags: [PostgreSQL, benchmarks, TPC, pgbench, performance-testing, capacity-planning, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your company needs to make a $2M infrastructure decision — whether to
|
|
13
|
+
migrate from self-managed PostgreSQL to Aurora PostgreSQL. The CTO
|
|
14
|
+
says "run some benchmarks and tell me which is faster." You know that
|
|
15
|
+
naive benchmarking leads to wrong conclusions, so you need to design
|
|
16
|
+
a rigorous benchmark that actually answers the right questions.
|
|
17
|
+
|
|
18
|
+
Context:
|
|
19
|
+
- Current: Self-managed PG 16 on r6g.4xlarge (16 vCPU, 128GB RAM)
|
|
20
|
+
- Candidate: Aurora PG 16 on db.r6g.4xlarge (same compute class)
|
|
21
|
+
- Workload: Mixed OLTP (70% reads, 30% writes), 50K TPS peak
|
|
22
|
+
- Data size: 500GB active dataset, 2TB total
|
|
23
|
+
- Critical queries: Point lookups, range scans, complex joins, bulk inserts
|
|
24
|
+
|
|
25
|
+
Common benchmarking mistakes you've seen teams make:
|
|
26
|
+
1. Using pgbench with default scale factor (fits entirely in RAM)
|
|
27
|
+
2. Benchmarking with empty tables (no realistic data distribution)
|
|
28
|
+
3. Running benchmarks for 5 minutes (not long enough for caches to warm)
|
|
29
|
+
4. Testing on a quiet system (no concurrent workload)
|
|
30
|
+
5. Ignoring storage performance (only testing CPU-bound queries)
|
|
31
|
+
6. Not testing failure scenarios (how does performance degrade under
|
|
32
|
+
replica failure, disk pressure, connection storms?)
|
|
33
|
+
7. Comparing list price vs actual cost (ignoring IOPS charges, data
|
|
34
|
+
transfer, backup costs)
|
|
35
|
+
|
|
36
|
+
Industry standard benchmarks:
|
|
37
|
+
- TPC-C: OLTP transactions (orders, payments, deliveries)
|
|
38
|
+
- TPC-H: Analytical queries (decision support)
|
|
39
|
+
- pgbench: PostgreSQL-specific, configurable
|
|
40
|
+
- sysbench: General-purpose database benchmark
|
|
41
|
+
- HammerDB: TPC-C/TPC-H implementation for PostgreSQL
|
|
42
|
+
|
|
43
|
+
Your VP asks: "Can you give me a number — queries per second on
|
|
44
|
+
Aurora vs self-managed — by Friday?"
|
|
45
|
+
|
|
46
|
+
Task: Design the benchmark plan. Write: the benchmark methodology
|
|
47
|
+
(what to test, how to test, how long), the workload design (realistic
|
|
48
|
+
representation of your actual workload), the metrics to collect and
|
|
49
|
+
how to interpret them, the pitfalls to avoid, and the decision
|
|
50
|
+
framework (how benchmark results translate into the migration decision).
|
|
51
|
+
|
|
52
|
+
assertions:
|
|
53
|
+
- type: llm_judge
|
|
54
|
+
criteria: "Benchmark methodology is rigorous — tests realistic data volume (500GB+ to exceed RAM), runs long enough for steady state (hours, not minutes), includes warm-up phase, tests under concurrent load matching production patterns, and tests both normal operation and degraded modes (replica failure, high connection count)"
|
|
55
|
+
weight: 0.35
|
|
56
|
+
description: "Rigorous benchmark methodology"
|
|
57
|
+
- type: llm_judge
|
|
58
|
+
criteria: "Workload design represents real usage — captures the 70/30 read/write mix, includes representative query types (point lookups, range scans, complex joins, bulk inserts), uses realistic data distributions (not uniform), and tests at multiple concurrency levels (10, 50, 100, 500 connections) to find saturation points"
|
|
59
|
+
weight: 0.35
|
|
60
|
+
description: "Realistic workload design"
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Decision framework goes beyond QPS — considers latency percentiles (P50/P95/P99), throughput under load, cost-per-transaction, operational overhead, failure behavior, and long-term cost trajectory. Acknowledges that benchmarks are one input to the decision alongside operational, compliance, and strategic factors"
|
|
63
|
+
weight: 0.30
|
|
64
|
+
description: "Holistic decision framework"
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: database-ma-integration
|
|
3
|
+
level: 5
|
|
4
|
+
course: postgresql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Plan database integration after M&A — merge two companies' PostgreSQL infrastructures while maintaining service continuity"
|
|
7
|
+
tags: [PostgreSQL, M&A, integration, data-migration, schema-merge, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your company (AcmePay, $200M ARR) just acquired a competitor
|
|
13
|
+
(QuickBill, $50M ARR). Both run on PostgreSQL. The board mandates
|
|
14
|
+
full technology integration within 12 months. You're leading the
|
|
15
|
+
database integration.
|
|
16
|
+
|
|
17
|
+
AcmePay (acquirer):
|
|
18
|
+
- PostgreSQL 16 on Aurora, 20 clusters, 30TB
|
|
19
|
+
- Well-documented schema, strong naming conventions
|
|
20
|
+
- 500 tables across 8 microservices
|
|
21
|
+
- 100K QPS peak, 99.95% availability
|
|
22
|
+
- PgBouncer, comprehensive monitoring
|
|
23
|
+
- 5 DBAs, mature processes
|
|
24
|
+
|
|
25
|
+
QuickBill (acquired):
|
|
26
|
+
- PostgreSQL 14 on self-managed EC2, 8 clusters, 10TB
|
|
27
|
+
- Organic schema growth, inconsistent naming
|
|
28
|
+
- 300 tables in a monolithic database
|
|
29
|
+
- 20K QPS peak, 99.5% availability
|
|
30
|
+
- No connection pooling, basic monitoring
|
|
31
|
+
- 1 DBA (the founder who wrote the original schema)
|
|
32
|
+
|
|
33
|
+
Integration challenges:
|
|
34
|
+
1. Schema conflicts: Both have "users", "invoices", "payments" tables
|
|
35
|
+
with different schemas, different ID formats (UUID vs serial), and
|
|
36
|
+
overlapping customer IDs
|
|
37
|
+
2. Data overlap: 2,000 customers exist in both systems — their data
|
|
38
|
+
must be merged, not duplicated
|
|
39
|
+
3. Compliance: QuickBill stores PII in plain text; AcmePay encrypts
|
|
40
|
+
at rest and at column level for SSN/tax IDs
|
|
41
|
+
4. Versioning: QuickBill on PG 14 needs upgrade to PG 16
|
|
42
|
+
5. Performance: QuickBill's monolith has 50 queries >10 seconds
|
|
43
|
+
6. Business continuity: Both products must remain operational during
|
|
44
|
+
integration — customers of both products are paying
|
|
45
|
+
7. API contracts: QuickBill's API returns data in different formats;
|
|
46
|
+
3rd-party integrations depend on these formats
|
|
47
|
+
8. Regulatory: Financial data retention requirements (7 years) mean
|
|
48
|
+
historical data must be carefully preserved and mapped
|
|
49
|
+
|
|
50
|
+
The CEO's directive: "I want one database, one platform, one team —
|
|
51
|
+
within 12 months. But we can't lose a single customer or a single
|
|
52
|
+
dollar of data."
|
|
53
|
+
|
|
54
|
+
Task: Write the integration plan. Include: the assessment of both
|
|
55
|
+
systems (gaps and risks), the schema unification strategy, the data
|
|
56
|
+
migration plan (handling overlapping customers), the phased timeline,
|
|
57
|
+
and the risk mitigation plan (what if integration fails mid-way).
|
|
58
|
+
|
|
59
|
+
assertions:
|
|
60
|
+
- type: llm_judge
|
|
61
|
+
criteria: "Schema unification strategy handles conflicts — defines approach for merging users/invoices/payments tables (ID mapping tables, namespace prefixing, or new unified schema), resolves UUID vs serial ID conflict, handles the 2,000 overlapping customers (deduplication strategy with merge rules), and preserves data lineage for regulatory compliance"
|
|
62
|
+
weight: 0.35
|
|
63
|
+
description: "Sound schema unification"
|
|
64
|
+
- type: llm_judge
|
|
65
|
+
criteria: "Phased timeline is realistic — breaks 12 months into phases (assessment, preparation, parallel run, migration, decommission), ensures business continuity at each phase (both products operational), includes PG 14→16 upgrade and PII encryption remediation for QuickBill data, and identifies dependencies between phases"
|
|
66
|
+
weight: 0.35
|
|
67
|
+
description: "Realistic phased timeline"
|
|
68
|
+
- type: llm_judge
|
|
69
|
+
criteria: "Risk mitigation addresses business-critical concerns — rollback plan at each phase, data validation (row counts, financial totals, customer record integrity), parallel running period where both systems serve traffic, and a kill switch to halt integration if customer impact is detected. Addresses API compatibility for 3rd-party integrations"
|
|
70
|
+
weight: 0.30
|
|
71
|
+
description: "Business-critical risk mitigation"
|
package/courses/postgresql-query-optimization/scenarios/level-5/database-product-development.yaml
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: database-product-development
|
|
3
|
+
level: 5
|
|
4
|
+
course: postgresql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Build a database performance product — design a SaaS tool that helps teams optimize PostgreSQL performance, from architecture to go-to-market"
|
|
7
|
+
tags: [PostgreSQL, product-development, SaaS, performance-monitoring, go-to-market, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You're a technical co-founder building a SaaS product for PostgreSQL
|
|
13
|
+
performance optimization. After 10 years as a DBA, you've seen the
|
|
14
|
+
same problems at every company. You want to productize your expertise.
|
|
15
|
+
|
|
16
|
+
Product vision: "Autopilot for PostgreSQL performance"
|
|
17
|
+
- Connects to any PostgreSQL database (RDS, Aurora, self-managed)
|
|
18
|
+
- Analyzes query performance continuously
|
|
19
|
+
- Recommends and optionally applies optimizations
|
|
20
|
+
- Provides actionable insights (not just dashboards)
|
|
21
|
+
|
|
22
|
+
Competitive landscape:
|
|
23
|
+
- pganalyze: Query performance monitoring ($500-2,000/mo)
|
|
24
|
+
- Datadog Database Monitoring: Part of broader APM ($23/host/mo)
|
|
25
|
+
- New Relic: Database monitoring as part of observability
|
|
26
|
+
- OtterTune: AI-powered tuning (acquired by AWS)
|
|
27
|
+
- Percona PMM: Open-source monitoring
|
|
28
|
+
- pgDash: Simple PostgreSQL monitoring
|
|
29
|
+
|
|
30
|
+
Your differentiation: Not just monitoring — actually fixing problems.
|
|
31
|
+
Every competitor shows you dashboards. You want to show the specific
|
|
32
|
+
query change, the specific index to add, and optionally apply it.
|
|
33
|
+
|
|
34
|
+
Technical challenges:
|
|
35
|
+
1. Data collection: How to gather query plans, statistics, and
|
|
36
|
+
performance data with minimal overhead (<1% CPU)
|
|
37
|
+
2. Analysis engine: How to identify optimization opportunities
|
|
38
|
+
automatically (unused indexes, missing indexes, query rewrites)
|
|
39
|
+
3. Safe recommendations: How to ensure recommendations don't break
|
|
40
|
+
things (test in shadow mode, rollback capability)
|
|
41
|
+
4. Multi-tenant: Each customer's data is sensitive — isolation required
|
|
42
|
+
5. Agent vs agentless: Install agent on customer's server vs connect
|
|
43
|
+
to pg_stat_statements remotely
|
|
44
|
+
|
|
45
|
+
Business model options:
|
|
46
|
+
A. Per-host pricing ($100-500/host/month)
|
|
47
|
+
B. Per-query pricing (based on optimized queries)
|
|
48
|
+
C. Value-based pricing (% of infrastructure cost saved)
|
|
49
|
+
D. Freemium (monitoring free, optimization paid)
|
|
50
|
+
|
|
51
|
+
You have $2M seed funding, 6 engineers, and 12 months to get to
|
|
52
|
+
product-market fit (50 paying customers).
|
|
53
|
+
|
|
54
|
+
Task: Write the product strategy. Include: the product architecture
|
|
55
|
+
(data collection, analysis, recommendation, application), the MVP
|
|
56
|
+
scope (what to build first for fastest path to 50 customers), the
|
|
57
|
+
go-to-market strategy (how to reach PostgreSQL teams), the pricing
|
|
58
|
+
model recommendation, and the technical roadmap (12-month plan).
|
|
59
|
+
|
|
60
|
+
assertions:
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Product architecture is technically sound — data collection uses pg_stat_statements + pg_stat_activity with minimal overhead, analysis engine identifies missing/unused indexes and slow query patterns, recommendations include specific SQL (CREATE INDEX, query rewrites), and the safe application path includes shadow testing and rollback. Multi-tenant data isolation is addressed"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "Sound product architecture"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "MVP scope is focused on fastest path to customers — identifies the highest-value feature to ship first (likely index recommendations or slow query identification), scopes an MVP achievable in 3-4 months with 6 engineers, explains what to cut from v1 (automated application, multi-database support), and defines clear success metrics for product-market fit"
|
|
67
|
+
weight: 0.35
|
|
68
|
+
description: "Focused MVP scope"
|
|
69
|
+
- type: llm_judge
|
|
70
|
+
criteria: "Go-to-market and pricing are realistic — identifies target customer profile (mid-size companies with 5-20 PostgreSQL instances, no dedicated DBA), distribution channels (PostgreSQL community, DevOps conferences, content marketing), pricing model is justified against competitors, and the 12-month roadmap has realistic milestones leading to 50 customers"
|
|
71
|
+
weight: 0.30
|
|
72
|
+
description: "Realistic GTM and pricing"
|
package/courses/postgresql-query-optimization/scenarios/level-5/database-regulatory-landscape.yaml
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: database-regulatory-landscape
|
|
3
|
+
level: 5
|
|
4
|
+
course: postgresql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Navigate database regulatory compliance — design PostgreSQL configurations for GDPR, PCI DSS, HIPAA, SOX, and emerging data sovereignty regulations"
|
|
7
|
+
tags: [PostgreSQL, compliance, GDPR, PCI-DSS, HIPAA, SOX, data-sovereignty, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
Your company is expanding into 3 new markets (EU, healthcare, and
|
|
13
|
+
government contracts). Each market has different database compliance
|
|
14
|
+
requirements, and your PostgreSQL infrastructure wasn't designed for
|
|
15
|
+
regulatory compliance. The legal team has given you 6 months to achieve
|
|
16
|
+
compliance or the expansion deals ($30M combined) will be lost.
|
|
17
|
+
|
|
18
|
+
Current PostgreSQL infrastructure:
|
|
19
|
+
- 20 clusters, all in US-East region
|
|
20
|
+
- No data classification (PII mixed with non-PII)
|
|
21
|
+
- Audit logging: only pg_log (not queryable, not tamper-evident)
|
|
22
|
+
- Encryption: TLS in transit, no encryption at rest, no column-level
|
|
23
|
+
- Access control: 5 shared database users for 200 engineers
|
|
24
|
+
- Data retention: No automated deletion, data kept forever
|
|
25
|
+
- Backups: Daily pg_dump, stored unencrypted in same region
|
|
26
|
+
|
|
27
|
+
Compliance requirements by market:
|
|
28
|
+
|
|
29
|
+
1. EU expansion (GDPR):
|
|
30
|
+
- Data residency: EU customer data must stay in EU
|
|
31
|
+
- Right to erasure: Must delete customer data on request within 30 days
|
|
32
|
+
- Data portability: Must export customer data in machine-readable format
|
|
33
|
+
- Breach notification: 72 hours to report data breaches
|
|
34
|
+
- Data minimization: Only collect what's necessary
|
|
35
|
+
- Audit trail: Prove who accessed what data and when
|
|
36
|
+
|
|
37
|
+
2. Healthcare (HIPAA):
|
|
38
|
+
- PHI must be encrypted at rest and in transit
|
|
39
|
+
- Access controls: Role-based, minimum necessary access
|
|
40
|
+
- Audit trail: All access to PHI must be logged and retained 6 years
|
|
41
|
+
- Business Associate Agreements with all vendors (including AWS)
|
|
42
|
+
- Breach notification: 60 days for breaches affecting 500+ individuals
|
|
43
|
+
|
|
44
|
+
3. Government (FedRAMP / NIST 800-53):
|
|
45
|
+
- Data must reside in US government-authorized regions
|
|
46
|
+
- FIPS 140-2 validated encryption modules
|
|
47
|
+
- Continuous monitoring and vulnerability scanning
|
|
48
|
+
- System categorization (Low, Moderate, High impact)
|
|
49
|
+
- Multi-factor authentication for all database access
|
|
50
|
+
|
|
51
|
+
Cross-cutting requirements:
|
|
52
|
+
- SOX compliance (public company): Database changes must be auditable,
|
|
53
|
+
separation of duties between development and production access
|
|
54
|
+
- PCI DSS (payment processing): Cardholder data encrypted, quarterly
|
|
55
|
+
vulnerability scans, access logging, tokenization
|
|
56
|
+
|
|
57
|
+
Task: Design the compliance architecture. Write: the data
|
|
58
|
+
classification and residency strategy, the encryption architecture
|
|
59
|
+
(at rest, in transit, column-level), the audit logging system (tamper-
|
|
60
|
+
evident, queryable, retained per regulation), the access control
|
|
61
|
+
redesign (from 5 shared users to RBAC), and the compliance automation
|
|
62
|
+
(how to continuously verify compliance, not just achieve it once).
|
|
63
|
+
|
|
64
|
+
assertions:
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Data classification and residency are addressed — defines data classification tiers (public, internal, confidential, restricted), maps PII/PHI/cardholder data to appropriate tiers, designs multi-region deployment for EU data residency (PostgreSQL in EU region with logical replication or partitioned access), and addresses right-to-erasure with soft-delete + scheduled purge patterns"
|
|
67
|
+
weight: 0.35
|
|
68
|
+
description: "Data classification and residency"
|
|
69
|
+
- type: llm_judge
|
|
70
|
+
criteria: "Encryption and access control are comprehensive — implements TDE or filesystem encryption at rest, column-level encryption (pgcrypto or application-level) for PII/PHI/cardholder data, redesigns access from 5 shared users to role-based access with per-engineer credentials, implements row-level security for data isolation, and addresses FIPS 140-2 requirements for government"
|
|
71
|
+
weight: 0.35
|
|
72
|
+
description: "Encryption and access control"
|
|
73
|
+
- type: llm_judge
|
|
74
|
+
criteria: "Audit logging and compliance automation are production-ready — implements tamper-evident audit logging (pgAudit or custom triggers with hash chains), retains logs per regulation (6 years for HIPAA, 7 for SOX), provides queryable audit trail, and designs continuous compliance monitoring (automated checks, drift detection, compliance dashboard) rather than point-in-time audits"
|
|
75
|
+
weight: 0.30
|
|
76
|
+
description: "Audit and compliance automation"
|
package/courses/postgresql-query-optimization/scenarios/level-5/master-optimization-shift.yaml
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: master-optimization-shift
|
|
3
|
+
level: 5
|
|
4
|
+
course: postgresql-query-optimization
|
|
5
|
+
type: output
|
|
6
|
+
description: "Master optimization shift — advise a CEO on a complete database transformation combining M&A integration, regulatory compliance, AI adoption, and 10x scaling"
|
|
7
|
+
tags: [PostgreSQL, shift-simulation, transformation, CEO-advisory, comprehensive, master]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You're an external database strategy advisor. A CEO calls you with
|
|
13
|
+
an urgent, complex situation that touches everything you know about
|
|
14
|
+
PostgreSQL.
|
|
15
|
+
|
|
16
|
+
The situation:
|
|
17
|
+
DataCorp ($500M ARR, 2,000 engineers) just acquired two companies
|
|
18
|
+
simultaneously:
|
|
19
|
+
- HealthSync ($50M ARR, healthcare SaaS, HIPAA-regulated)
|
|
20
|
+
- EuroTrade ($80M ARR, EU-based fintech, GDPR + PCI DSS)
|
|
21
|
+
|
|
22
|
+
DataCorp runs PostgreSQL 15 on Aurora (30 clusters, 100TB).
|
|
23
|
+
HealthSync runs PostgreSQL 13 on self-managed EC2 (5 clusters, 8TB).
|
|
24
|
+
EuroTrade runs PostgreSQL 16 on Citus (10 clusters, 40TB, sharded).
|
|
25
|
+
|
|
26
|
+
The board has set 4 concurrent mandates (18-month timeline):
|
|
27
|
+
1. Integrate all three databases into a unified platform
|
|
28
|
+
2. Achieve HIPAA, GDPR, and PCI DSS compliance across the platform
|
|
29
|
+
3. Prepare for IPO (99.99% availability, SOX compliance, cost optimization)
|
|
30
|
+
4. Support 10x growth (DataCorp expects to grow from $500M to $5B ARR
|
|
31
|
+
in 5 years)
|
|
32
|
+
|
|
33
|
+
Constraints:
|
|
34
|
+
- Total database team across all 3 companies: 15 DBAs
|
|
35
|
+
- Combined infrastructure cost: $2M/month
|
|
36
|
+
- Zero customer data loss is non-negotiable
|
|
37
|
+
- All 3 products must remain operational during integration
|
|
38
|
+
- EU data must stay in EU (HealthSync currently stores some EU patient
|
|
39
|
+
data in US)
|
|
40
|
+
- IPO due diligence begins in 12 months
|
|
41
|
+
|
|
42
|
+
The CEO asks: "Give me the plan. I need to know: What's the unified
|
|
43
|
+
architecture? What's the timeline? What's the budget? What's the risk?
|
|
44
|
+
And what should I tell the board?"
|
|
45
|
+
|
|
46
|
+
Task: Write the comprehensive advisory document. Include: the unified
|
|
47
|
+
database architecture (handling Aurora + self-managed + Citus), the
|
|
48
|
+
compliance strategy (achieving all 4 regulatory frameworks
|
|
49
|
+
simultaneously), the integration timeline (phased approach over 18
|
|
50
|
+
months), the budget projection (with cost optimization targets), and
|
|
51
|
+
the board communication strategy (how to frame this as opportunity,
|
|
52
|
+
not just cost).
|
|
53
|
+
|
|
54
|
+
assertions:
|
|
55
|
+
- type: llm_judge
|
|
56
|
+
criteria: "Unified architecture handles all 3 database platforms — addresses Aurora-to-Citus or Citus-to-Aurora consolidation (or hybrid approach), PG 13→16 upgrade path for HealthSync, handles Citus sharding patterns (distributed tables, reference tables) during migration, and designs for 10x scale (100TB→1PB trajectory). Architecture is realistic given 15 DBAs"
|
|
57
|
+
weight: 0.35
|
|
58
|
+
description: "Viable unified architecture"
|
|
59
|
+
- type: llm_judge
|
|
60
|
+
criteria: "Compliance strategy achieves all 4 frameworks — HIPAA (PHI encryption, access logging, BAAs), GDPR (EU data residency, right to erasure, DPA), PCI DSS (cardholder tokenization, network segmentation), and SOX (audit trails, separation of duties). Addresses the immediate risk of EU patient data in US. Identifies overlapping requirements to reduce effort"
|
|
61
|
+
weight: 0.35
|
|
62
|
+
description: "Multi-framework compliance"
|
|
63
|
+
- type: llm_judge
|
|
64
|
+
criteria: "Timeline, budget, and board communication are executive-ready — 18-month phased plan with clear milestones and go/no-go gates, budget includes infrastructure, personnel, and opportunity cost, risk register identifies top 5 risks with mitigation strategies, and the board narrative frames integration as competitive advantage (unified data platform enables cross-sell, AI/ML, faster innovation) not just technical debt remediation"
|
|
65
|
+
weight: 0.30
|
|
66
|
+
description: "Executive-ready delivery"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
id: terraform-infrastructure-setup
|
|
2
|
+
name: "Terraform Infrastructure Setup"
|
|
3
|
+
description: >
|
|
4
|
+
Master Terraform infrastructure setup from basic HCL syntax and resource
|
|
5
|
+
provisioning to enterprise IaC platform strategy. Progress through provider
|
|
6
|
+
configuration, state management, module design, CI/CD pipelines, policy
|
|
7
|
+
enforcement, and organizational transformation — the complete journey from
|
|
8
|
+
first terraform init to advising boards on infrastructure investment.
|
|
9
|
+
levels: 5
|
|
10
|
+
scenarios_per_level: 10
|
|
11
|
+
tags: [development, Terraform, IaC, infrastructure, DevOps, HCL, cloud, provisioning]
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
meta:
|
|
2
|
+
id: terraform-init-errors
|
|
3
|
+
level: 1
|
|
4
|
+
course: terraform-infrastructure-setup
|
|
5
|
+
type: output
|
|
6
|
+
description: "Debug terraform init failures — diagnose provider installation errors, backend configuration issues, and registry connectivity problems"
|
|
7
|
+
tags: [Terraform, init, providers, backend, registry, beginner]
|
|
8
|
+
|
|
9
|
+
state: {}
|
|
10
|
+
|
|
11
|
+
trigger: |
|
|
12
|
+
You run `terraform init` and get this error:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Initializing the backend...
|
|
16
|
+
|
|
17
|
+
Initializing provider plugins...
|
|
18
|
+
- Finding hashicorp/aws versions matching "~> 5.0"...
|
|
19
|
+
|
|
20
|
+
Error: Failed to query available provider packages
|
|
21
|
+
|
|
22
|
+
Could not retrieve the list of available versions for provider
|
|
23
|
+
hashicorp/aws: could not connect to registry.terraform.io:
|
|
24
|
+
connection timed out
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Your terraform configuration:
|
|
28
|
+
|
|
29
|
+
```hcl
|
|
30
|
+
terraform {
|
|
31
|
+
required_providers {
|
|
32
|
+
aws = {
|
|
33
|
+
source = "hashicorp/aws"
|
|
34
|
+
version = "~> 5.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
backend "s3" {
|
|
38
|
+
bucket = "my-terraform-state"
|
|
39
|
+
key = "prod/terraform.tfstate"
|
|
40
|
+
region = "us-east-1"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
provider "aws" {
|
|
45
|
+
region = "us-east-1"
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Additional context:
|
|
50
|
+
- You're behind a corporate proxy
|
|
51
|
+
- The .terraform directory doesn't exist yet
|
|
52
|
+
- Running Terraform v1.7.0
|
|
53
|
+
|
|
54
|
+
Task: Explain terraform init, what it does step by step (backend
|
|
55
|
+
initialization, provider installation, module download), common
|
|
56
|
+
init failures and their fixes, provider version constraints
|
|
57
|
+
(= vs ~> vs >= syntax), and how to work with Terraform behind
|
|
58
|
+
proxies or air-gapped environments.
|
|
59
|
+
|
|
60
|
+
assertions:
|
|
61
|
+
- type: llm_judge
|
|
62
|
+
criteria: "Init process is explained step by step — terraform init: (1) initializes backend (configures state storage, creates .terraform/terraform.tfstate for backend config), (2) downloads provider plugins from registry.terraform.io to .terraform/providers/, (3) downloads modules to .terraform/modules/. The specific error is a network connectivity issue — behind a corporate proxy, set HTTP_PROXY and HTTPS_PROXY environment variables. Alternative: use terraform provider mirror to create a local filesystem mirror for air-gapped environments. The .terraform.lock.hcl file records provider versions and hashes for reproducibility"
|
|
63
|
+
weight: 0.35
|
|
64
|
+
description: "Init process"
|
|
65
|
+
- type: llm_judge
|
|
66
|
+
criteria: "Provider version constraints are covered — version = '= 5.0.0' (exact), '~> 5.0' (allows 5.x but not 6.0, pessimistic constraint), '>= 5.0, < 6.0' (range). Best practice: use ~> for minor version flexibility. Lock file (.terraform.lock.hcl): commit to version control, records exact versions and checksums. To update: terraform init -upgrade. Provider source format: namespace/type (hashicorp/aws). Third-party providers: specify full source in required_providers block"
|
|
67
|
+
weight: 0.35
|
|
68
|
+
description: "Version constraints"
|
|
69
|
+
- type: llm_judge
|
|
70
|
+
criteria: "Common init failures are listed with fixes — (1) registry connectivity: proxy settings, TF_CLI_CONFIG_FILE for custom registry, provider mirror for air-gapped. (2) Backend errors: S3 bucket doesn't exist, DynamoDB table missing for locking, insufficient IAM permissions. (3) Provider not found: typo in source, missing required_providers block. (4) Version conflicts: lock file doesn't match config, run terraform init -upgrade. (5) Module source errors: git credentials, registry authentication"
|
|
71
|
+
weight: 0.30
|
|
72
|
+
description: "Common failures"
|