READOS / Technology
Database Performance, Concurrency and Safe Change
Why systems slow down, how concurrent work collides, and how to change live databases without losing data.
Start reading →Contents
- 01Why business systems slow down: diagnosing database performance before buying more hardwareSlow business systems are often blamed on hardware. How to measure the problem, find where time is really lost, fix common database causes and plan capacity before it runs out.
- 02Reading query plans through row estimatesDiagnose database query plans by comparing estimated and actual row counts, tracing estimation errors and testing targeted improvements against real workloads.
- 03Designing composite indexes for real queriesA practical method for choosing composite database indexes by considering filters, ordering, returned columns and the cost imposed on the wider workload.
- 04Partitioning database tables around real workloadsChoose database partition boundaries using query patterns, data lifecycle and maintenance needs, while checking indexing, late arrivals and operational costs.
- 05Sizing and managing database connection poolsUnderstand connection pool limits, waiting time, transaction scope and failure recovery so application demand stays within the database's capacity.
- 06Hash tables, collisions and database lookupsUnderstand how hashing supports equality searches, why collisions and skew matter, and how to evaluate hash-based database work without misleading speed claims.
- 07ORM loading strategies and hidden query costsDiagnose hidden database work in object-relational mapping by comparing lazy, joined and batched loading against the data each application operation needs.
- 08Cache invalidation and database correctnessDesign database caches around acceptable staleness, update races, missing records and failure recovery, with practical ways to test their correctness.
- 09Transaction isolation and concurrent business decisionsUnderstand why individually valid database transactions can conflict, how isolation affects business rules, and how to test concurrent decisions and retries.
- 10Diagnosing database deadlocks and lock orderingUnderstand database deadlocks, distinguish them from ordinary blocking, and use evidence, consistent lock ordering and bounded retries to improve reliability.
- 11Optimistic concurrency for long-lived user editsProtect database records edited across separate requests by checking versions atomically, defining conflict scope and preserving users' work when changes collide.
- 12Identity maps and conflicting copies of database recordsHow applications keep one coherent object for each database record, manage its lifetime and avoid conflicting edits, stale values and accidental cross-customer reuse.
- 13Coordinating database writes with a unit of workHow to collect related application changes, distinguish flushing from committing, order dependent writes and handle failures without leaving a business operation half complete.
- 14Separating database access from business decisionsHow to place a useful boundary between persistence code and business rules, preserve transaction meaning and test applications without hiding important database behaviour.
- 15Retrying database work without repeating business effectsDesign database retries around known transaction outcomes, repeatable operations, bounded deadlines and load control so that recovery does not duplicate work.
- 16Compensating business workflows across databasesDesign recovery for workflows that commit changes in several systems, with explicit compensation, durable progress, safe retries and visible unresolved work.
- 17Reconciling offline records after reconnectionDesign offline data capture around provisional work, durable local records, conflict rules and clear reconciliation when devices reconnect to shared systems.
- 18Changing a live business database safely: structure changes, migration scripts, testing and rollbackCustom systems change as businesses change. How to alter a live database's structure without losing data or stopping work: environments, versioned scripts, staged changes and rollback.
- 19Backfilling data while old and new schemas coexistPlan a database backfill that preserves concurrent updates, supports mixed application versions and proves completeness before the old representation is retired.
- 20Retiring database compatibility structures safelyHow to prove old database views, columns and synchronisation paths are no longer needed, account for infrequent consumers, and remove them with a tested recovery plan.
These topic-based reading collections are organised alphabetically; chapters may be read in any order.
← All books