DBA Cheat Sheet Library
Production-verified queries for daily DBA operations, incident triage, and performance profiling.
Printable & Offline DBA Cheat Sheets
psql CLI Quick Reference
Complete PostgreSQL Command Line Reference
InnoDB Tuning Reference
MySQL InnoDB Storage Engine Performance Tuning Guide
PostgreSQL Security Hardening
End-to-End Database Hardening Guide for Production Systems
PostgreSQL Backup & Recovery Reference
PostgreSQL Backup, PITR & Disaster Recovery Guide
MySQL Backup & Recovery Reference
MySQL Backup, Binary Log PITR & CLONE Guide
PostgreSQL Indexing & Query Optimization
PostgreSQL Index Types, EXPLAIN ANALYZE & Query Tuning
MySQL OCP 8.0 DBA Exam Topic Map
Comprehensive Study & Quick Reference Guide for Oracle 1Z0-908
Identify Head Blockers & High Resource SPIDs
Finds root blocking sessions, wait types (PAGEIOLATCH, LCK_M_X), and execution plans.
Terminate Blocking SPID & Monitor Rollback Progress
Terminates a runaway session and monitors the exact rollback progress percentage using STATUSONLY.
Extract Missing Index Recommendations from Query Engine
Queries sys.dm_db_missing_index_* views to find high-impact indexes that will reduce query cost.
Index Fragmentation Analysis & Reorganize / Rebuild Matrix
Measures physical index fragmentation. Recommends REORGANIZE for 10-30% and online REBUILD for >30%.
TempDB Space Allocation & Top Consumer Sessions
Breaks down TempDB consumption across user tables, internal worktables (sort/hash spills), and RCSI version store.
Top Server Wait Statistics (Excluding Benign Idle Waits)
Filters benign system waits from sys.dm_os_wait_stats to rank actual CPU, storage I/O, and lock bottlenecks.
Memory Health: Page Life Expectancy & Buffer Cache Hit Ratio
Calculates how long data pages remain in RAM. PLE < 300s indicates severe memory starvation and aggressive buffer churning.
Backup History, Compressed Size & Backup Recency Check
Audits msdb backup tables to ensure latest Full, Differential, and Log backups conform to RPO SLAs.
Transaction Log Space & Virtual Log File (VLF) Count
Inspects log_reuse_wait reasons and detects high VLF counts (>1000) that degrade crash recovery performance.
Always On Availability Groups Synchronization & Redo Lag Health
Monitors synchronization state, redo queue size, and log send latency across Always On replicas.