// Articles

Guides and deep dives

Guides, tutorials, and comparisons to help you build better backend applications.

Filter by category: All (1089)
RDS Postgres Parameter Groups: What to Change and How

How RDS parameter groups work, why the default group cannot be edited, static vs dynamic parameters, the Postgres settings worth changing first, and which settings belong in your migrations instead.

6 Min Read
Postgres statement_timeout, lock_timeout and Idle Transaction Timeouts

What each Postgres timeout limits, the error codes they raise, where to set them so migrations and reports are not caught by limits meant for API queries, and how lock_timeout keeps a schema change from stalling every request.

5 Min Read
Postgres Materialized Views: Refresh Strategies for APIs

When a materialized view beats a cache or a summary table, how REFRESH and REFRESH CONCURRENTLY differ, the unique index requirement, scheduling refreshes, and permission details that trip up application roles.

5 Min Read
Postgres JSONB Indexing with GIN and Expression Indexes

How to index JSONB columns in Postgres: GIN with jsonb_ops vs jsonb_path_ops, which operators each index supports, expression indexes for single keys, generated columns for hot fields, and the query shapes that silently skip the index.

5 Min Read
How to Read Postgres EXPLAIN ANALYZE

What each line of an EXPLAIN ANALYZE plan means, how to spot bad row estimates, sequential scans that should be index scans, sorts that spill to disk and loops that multiply cost, with a worked example of fixing one query.

6 Min Read
Postgres Deadlocks: Why They Happen and How to Fix Them

How to read a deadlock detected error, the access patterns that cause most Postgres deadlocks, lock ordering and smaller transactions as fixes, foreign key and batch upsert surprises, and retrying safely when one still happens.

5 Min Read
Postgres Autovacuum Tuning for Busy Tables

Why the default autovacuum settings fall behind on large and frequently updated tables, how the thresholds and cost limits work, per-table settings that fix it, and the long-running transactions that stop vacuum regardless of tuning.

5 Min Read
The N+1 Query Problem in Backend APIs

What the N+1 query problem is, why ORMs and GraphQL resolvers create it, how to spot it in traces and pg_stat_statements, and the three fixes: joins, batched ANY queries and DataLoader-style batching.

5 Min Read
Patient Consent Management Backend: Records, Revocation and Enforcement

How to build the backend that records patient consent and authorizations, versions consent documents, handles expiry and revocation, and enforces consent at the moment data is used or shared, with an audit trail for every decision.

6 Min Read
Account Statements Backend: Period Close, PDF Generation and Delivery

How to build the backend that produces monthly account statements for a fintech product: period cutoffs, balance snapshots from the ledger, idempotent generation per account, PDF storage, customer notification and the record retention questions regulators ask.

6 Min Read
Product Reviews Backend: Verified Purchases, Moderation and Ratings

How to build the backend behind product reviews in an online store: verified purchase checks, one review per customer, moderation rules that apply regardless of rating, rating aggregates that do not need a full scan, sorting by confidence and review requests after delivery.

6 Min Read
Cron Job Monitoring: Catching Jobs That Fail or Never Run

The four ways scheduled jobs fail, why error alerts miss the worst one, heartbeat and last-success metrics, run history tables, and the alert rules that catch a job that silently stopped running.

5 Min Read