dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
Cheat Sheets

DBA Cheat Sheet Library

Production-verified queries for daily DBA operations, incident triage, and performance profiling.

Featured Reference Posters

Printable & Offline DBA Cheat Sheets

PDF (A4) · PNG (1920px) · HTML
postgresql
PostgreSQL 16 / 17

psql CLI Quick Reference

Complete PostgreSQL Command Line Reference

Connection Strings & URI Syntax
Complete Meta Commands (\dt+, \dn+, \du)
Output & Formatting Options
mysql
MySQL 8.0 / 8.4

InnoDB Tuning Reference

MySQL InnoDB Storage Engine Performance Tuning Guide

Buffer Pool Sizing Formula (70-80%)
Redo Log & O_DIRECT Configuration
Production my.cnf Ready Template
postgresql
PostgreSQL 15 / 16 / 17

PostgreSQL Security Hardening

End-to-End Database Hardening Guide for Production Systems

SCRAM-SHA-256 & Secure pg_hba.conf
Least Privilege & public Schema Lockdown
TLS/SSL verify-full Configuration
postgresql
PostgreSQL 14 / 15 / 16 / 17

PostgreSQL Backup & Recovery Reference

PostgreSQL Backup, PITR & Disaster Recovery Guide

pg_dump & pg_dumpall Optimal Flags
WAL Archiving & Non-Blocking Physical Backups
Point-in-Time Recovery (PITR) Walkthrough
mysql
MySQL 8.0 / 8.4

MySQL Backup & Recovery Reference

MySQL Backup, Binary Log PITR & CLONE Guide

mysqldump --single-transaction & Fast Restore
MySQL Shell Parallel dumpInstance / loadDump
Minute-Accurate PITR with Binary Logs
postgresql
PostgreSQL 14 / 15 / 16 / 17

PostgreSQL Indexing & Query Optimization

PostgreSQL Index Types, EXPLAIN ANALYZE & Query Tuning

B-Tree, GIN, GiST & BRIN Index Selection Guide
EXPLAIN (ANALYZE, BUFFERS) Execution Plan Reading
Index Skip Scan, Partial & Expression Indexes
mysql
Oracle 1Z0-908 · MySQL 8.0

MySQL OCP 8.0 DBA Exam Topic Map

Comprehensive Study & Quick Reference Guide for Oracle 1Z0-908

All 7 Exam Domains & High-Risk Exam Pitfalls
InnoDB Cluster, Group Replication & Router
Crucial MySQL 8.0 Default Values to Memorize
Kategori:
postgresqltroubleshoot Safe / Read-Only
BASIC

Find Long-Running Active Queries & Locks

Lists active queries running longer than 5 minutes, along with client IP, state, and wait event details.

#pg_stat_activity#long queries#troubleshooting
postgresqltroubleshoot Dikkat / Caution
BASIC

Cancel or Terminate a Blocking Backend Query

First attempts graceful query cancellation; if unresponsive, forcefully terminates the backend PID.

#kill query#pg_terminate_backend#emergency
postgresqlperformance Safe / Read-Only
INTERMEDIATE

Identify Top Bloated Tables & Dead Tuple Counts

Identifies tables with high dead tuple ratios requiring manual vacuuming or autovacuum tuning.

#autovacuum#bloat#dead tuples#maintenance
postgresqlperformance Safe / Read-Only
INTERMEDIATE

Find Unused Indexes Wasting Storage and Write I/O

Finds non-primary indexes with zero scans since server restart that degrade INSERT/UPDATE speeds.

#indexes#unused index#optimization
postgresqladmin Safe / Read-Only
BASIC

List Database and Top Table Disk Footprints

Calculates human-readable disk sizes for databases and top 10 individual tables including indexes.

#disk size#storage#admin
mysqltroubleshoot Safe / Read-Only
BASIC

Inspect Running Threads & Blocked Queries

Queries performance views to find threads in execution state exceeding execution thresholds.

#processlist#slow queries#troubleshoot
mysqlperformance Safe / Read-Only
INTERMEDIATE

Check InnoDB Engine Status & Latest Deadlock Trace

Displays semaphore waits, latest deadlock transaction dumps, and buffer pool hit ratios.

#innodb#deadlock#locks
mysqlperformance Safe / Read-Only
INTERMEDIATE

Calculate InnoDB Buffer Pool Hit Ratio

Calculates cache hit efficiency. A ratio lower than 99% indicates buffer pool size should be increased.

#buffer pool#memory#performance
sql-servertroubleshoot Safe / Read-Only
INTERMEDIATE

Identify Head Blockers & High Resource SPIDs

Finds root blocking sessions, wait types (PAGEIOLATCH, LCK_M_X), and execution plans.

#blocking#sys.dm_exec_requests#spids
sql-servertroubleshoot Safe / Read-Only
BASIC

Terminate Blocking SPID & Monitor Rollback Progress

Terminates a runaway session and monitors the exact rollback progress percentage using STATUSONLY.

#kill#spid#rollback#emergency
sql-serverperformance Safe / Read-Only
ADVANCED

Extract Missing Index Recommendations from Query Engine

Queries sys.dm_db_missing_index_* views to find high-impact indexes that will reduce query cost.

#missing indexes#dmv#tuning
sql-serverperformance Safe / Read-Only
INTERMEDIATE

Index Fragmentation Analysis & Reorganize / Rebuild Matrix

Measures physical index fragmentation. Recommends REORGANIZE for 10-30% and online REBUILD for >30%.

#fragmentation#rebuild#reorganize#indexes
sql-serverperformance Safe / Read-Only
INTERMEDIATE

TempDB Space Allocation & Top Consumer Sessions

Breaks down TempDB consumption across user tables, internal worktables (sort/hash spills), and RCSI version store.

#tempdb#dmv#space usage#version store
sql-serverperformance Safe / Read-Only
ADVANCED

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.

#wait stats#dmv#pageiolatch#cxpacket#tuning
sql-serverperformance Safe / Read-Only
INTERMEDIATE

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.

#ple#page life expectancy#buffer pool#memory
sql-serverbackup Safe / Read-Only
BASIC

Backup History, Compressed Size & Backup Recency Check

Audits msdb backup tables to ensure latest Full, Differential, and Log backups conform to RPO SLAs.

#backup#msdb#rpo#disaster recovery
sql-serverbackup Safe / Read-Only
INTERMEDIATE

Transaction Log Space & Virtual Log File (VLF) Count

Inspects log_reuse_wait reasons and detects high VLF counts (>1000) that degrade crash recovery performance.

#transaction log#vlf#log_reuse_wait#ldf
sql-servertroubleshoot Safe / Read-Only
ADVANCED

Always On Availability Groups Synchronization & Redo Lag Health

Monitors synchronization state, redo queue size, and log send latency across Always On replicas.

#alwayson#availability groups#replica lag#hadr