Three cheatsheets covering PostgreSQL, Redis, and Neo4j — query patterns, indexing, persistence, and admin commands for the three databases you actually run.
Three cheatsheets for the databases you're most likely to run in production: PostgreSQL for relational workloads, Redis for caching and queues, and Neo4j for connected data. Each sheet covers query patterns, configuration that matters, and the admin commands that rescue you at 2am.
PostgreSQL Cheatsheet
ON CONFLICT), LATERAL joinsEXPLAIN ANALYZE readingRedis Cheatsheet
SCAN not KEYS)MOVED redirects, sentinel vs cluster modeNeo4j Cheatsheet
# Add players with scores (updates if member exists)
ZADD leaderboard 100 "player1" 85 "player2" 120 "player3"
# Top 3 with scores, highest first
ZREVRANGE leaderboard 0 2 WITHSCORES
# A player's rank (0-based) and score
ZREVRANK leaderboard "player1"
ZSCORE leaderboard "player1"
# Paginate the full board — ranks 10-19
ZREVRANGE leaderboard 10 19 WITHSCORES
-- Index only unshipped orders: 2% of rows instead of 100%
CREATE INDEX idx_orders_pending
ON orders (customer_id, created_at)
WHERE status = 'pending';
-- The planner uses it when the predicate matches
EXPLAIN ANALYZE
SELECT * FROM orders
WHERE customer_id = 42 AND status = 'pending'
ORDER BY created_at DESC LIMIT 10;
| Workload | Database | Why | |---|---|---| | Transactions, relations, constraints | PostgreSQL | ACID, joins, mature tooling | | Caching, rate limits, queues, sessions | Redis | Sub-millisecond, in-memory semantics | | Deep relationship traversal, recommendations | Neo4j | Index-free adjacency, Cypher |
Mixed workloads are normal — PostgreSQL as source of truth, Redis in front, Neo4j beside. The sheets cross-reference these integration points (e.g., moving queue patterns between Redis lists and Postgres SKIP LOCKED).
$9.00
Which versions do the sheets target? PostgreSQL 16, Redis 7.x, Neo4j 5.x. Version-specific notes appear where 15/6/4 behaviour differs.
Does the Neo4j sheet cover the GDS library? It covers APOC in depth; GDS algorithm selection is a separate topic — see the Neo4j GDS article for that.
Are the cheatsheets updated? Yes — buyers get re-download access to new revisions through the library page.