Module Catalogue
18 modules available
MySQL Replication Status Check
Script to check MySQL/MariaDB replication lag and alert if it exceeds threshold.
DB Connection Pool Monitor
Query to check active connections, idle connections and pool usage in PostgreSQL.
Cursor-based Pagination Query
Implement cursor-based (keyset) pagination in SQL — faster than OFFSET for large tables.
Deadlock Detection and Prevention
Query Postgres lock waiters and identify deadlock candidates before they occur.
MongoDB Aggregation Pipeline
Count, group and sort documents using PyMongo aggregation pipeline.
Row-Level Security in Postgres
Enable RLS on a table so users can only read their own rows.
Redis Memory Usage Report
Report the top 20 Redis keys by memory usage using MEMORY USAGE command.
Postgres JSON Querying
Extract, filter and aggregate data stored in JSONB columns.
Redis Pub/Sub Listener
Subscribe to a Redis channel and dispatch messages to registered handlers.
Rolling 30-day Aggregate View
Materialized view of daily module views for the last 30 days, refreshed hourly.
SQLAlchemy Bulk Insert with Chunks
Insert thousands of rows efficiently using bulk_insert_mappings in chunks.
PostgreSQL UPSERT Pattern
Insert or update a row atomically with ON CONFLICT DO UPDATE — no race conditions.
PostgreSQL Partitioning by Range
Range-partition a large table by month for query performance and easy archival.
Alembic Migration Boilerplate
Alembic migration file with upgrade and downgrade steps and proper op helpers.
Common Table Expression Patterns
Practical CTE examples: recursive hierarchy, deduplication, and windowed aggregates.
Page 1 of 2