Best of DatabaseMarch 2026

  1. 1
    Article
    Avatar of growwenggGroww Engineering·10w

    How Groww Migrated from MySQL to CockroachDB to Power Its Cell-Based Architecture (Part 1)

    Groww, a financial platform, migrated from MySQL to CockroachDB to support a cell-based architecture capable of 10x scale. MySQL's lack of native sharding and multi-cloud failover paths drove the decision. CockroachDB was chosen for its PostgreSQL compatibility, full ACID compliance, multi-region active-active deployment (RPO=0, RTO<10s), and its 'Regional By Row' feature that enables moving users between cells by updating a single column. Key migration challenges included eliminating auto-increment IDs (replaced with UUIDs or cached sequences), fixing sequential index hotspots using hash-sharded indexes, and handling nullable column indexes with partial indexes. An automated pipeline was built to move data with minimal downtime. Part 2 will cover multi-region node deployment and cell-to-region mapping.

  2. 2
    Article
    Avatar of infoqInfoQ·10w

    Netflix Automates RDS PostgreSQL to Aurora PostgreSQL Migration Across 400 Production Clusters

    Netflix built an internal automation platform to migrate nearly 400 RDS PostgreSQL production clusters to Amazon Aurora PostgreSQL with minimal downtime. The system uses a self-service workflow that handles physical read replica creation from storage snapshots, WAL replication validation, CDC slot coordination, controlled quiescence and cutover, and rollback safeguards. Because Netflix routes all database access through an Envoy-based data access layer that abstracts endpoints from application code, migrations happen transparently at the infrastructure level. A real-world case study shows how the team resolved an elevated OldestReplicationSlotLag caused by a stale logical replication slot before completing a successful migration for device certification and partner billing workloads.

  3. 3
    Video
    Avatar of codetothemoonCode to the Moon·10w

    1000x Faster Than Your Database??? SpacetimeDB Explained by Creator Tyler C.

    Tyler Cloutier, creator of SpacetimeDB at Clockwork Labs, explains the architecture and performance characteristics of SpacetimeDB, a database originally built to power the MMO BitCraft Online. Key technical insights include: transactions execute inside the database (eliminating network hops), a thread-per-core model keeps data in L1 CPU cache, and interactive transactions are traded away for extreme throughput. Benchmarks show 4,000 TPS with Node+Postgres vs 104,000 TPS with SpacetimeDB (TypeScript reducers) and 167,000 TPS with Rust reducers. The conversation covers the database's real-time subscription model (streaming query derivatives to clients), ACID durability guarantees via pipelined async disk writes, the new SpacetimeAuth OIDC system in v2.0, and honest limitations including no interactive transactions, incomplete Postgres compatibility, and single-node write architecture. Tyler also responds to criticism from Vicent Marti, clarifying that the alleged data-loss issue was based on a misreading of the codebase.

  4. 4
    Article
    Avatar of hnHacker News·9w

    GitHub - creationix/rx: RX encoder, decoder, and CLI data tool

    REXC is a binary data encoding format and library for JavaScript/TypeScript that serves as a drop-in replacement for JSON.stringify/JSON.parse. It claims 18x smaller output through binary-encoded numbers, de-duplicated strings, and shared schemas, plus 23,000x faster single-key lookup via O(log n) binary search directly on encoded bytes. The library returns a Proxy over a flat byte buffer, enabling near-zero heap allocations. It includes a full CLI tool for converting between JSON and REXC, pretty-printing, and inspecting encoding structure. A low-level cursor API enables zero-allocation traversal for performance-critical paths, and an Inspect API exposes a lazy AST mapping 1:1 to the byte encoding.

  5. 5
    Article
    Avatar of freecodecampfreeCodeCamp·8w

    An Introduction to Database System Design

    A beginner-friendly introduction to database system design covering core concepts and practical implementation. Topics include the components of a database system, types of databases (relational, NoSQL, cloud, etc.), the four stages of database design (requirements analysis, conceptual, logical, physical), and normalization through the first three normal forms. A hands-on section walks through designing a library database using PostgreSQL and pgAdmin 4, with SQL examples for creating tables with primary/foreign keys, inserting data, and querying with SELECT, WHERE, and JOIN.

  6. 6
    Article
    Avatar of lobstersLobsters·12w

    The real cost of random I/O

    PostgreSQL's `random_page_cost` has been set to 4.0 by default for ~25 years, but experiments on modern SSDs show the actual cost ratio of random vs. sequential I/O is closer to 25-35x, not 4x. This means the planner picks suboptimal plans (sequential scan instead of index scan) for selectivities between 0.2% and 2.2%. Setting `random_page_cost` to ~30 aligns cost estimates with actual durations. However, lowering the value can still be justified in OLTP workloads with high cache hit rates, where random I/O avoids expensive full table scans. A complicating factor is that prefetching (which benefits sequential and bitmap scans but not index scans) interacts with `random_page_cost` in non-obvious ways, and the current cost model ignores prefetching entirely. Proposed improvements include separating non-I/O costs from `random_page_cost`, better cache statistics, and incorporating prefetching into the cost model.

  7. 7
    Article
    Avatar of devtoDEV·9w

    Why I, as Someone Who Likes MySQL, Now Want to Recommend PostgreSQL

    A long-time MySQL user explains why they now recommend PostgreSQL for new projects. The post acknowledges that many historical PostgreSQL weaknesses (VACUUM complexity, DDL operations, replication) have become less relevant in the managed cloud era. It then details concrete application-level advantages PostgreSQL still holds: ON CONFLICT DO NOTHING vs INSERT IGNORE, the RETURNING clause for getting back changed rows, more natural VALUES usage in JOINs and UPDATEs, window functions in update processing via CTEs, partial indexes, deferred foreign key constraints, pgvector support, and simpler character set/collation handling. The conclusion is not that MySQL is bad, but that PostgreSQL offers clearer advantages for application implementation today.

  8. 8
    Article
    Avatar of zaidesantonManager.dev·9w

    The unwritten laws of software engineering

    Seven hard-learned unwritten rules of software engineering drawn from real incidents: always roll back before debugging when production breaks after a deploy; test your backup restores, not just their existence; logging is always imperfect but aim for balance; every DB change needs a tested rollback plan; external dependencies will fail so plan for it; use the four-eyes rule for any risky operation; and temporary fixes become permanent, so make them at least non-hacky.

  9. 9
    Video
    Avatar of christianlempaChristian Lempa·11w

    Uptime Kuma v2 is HERE // Breaking Changes & Safe Upgrade Checklist

    Uptime Kuma v2 introduces MariaDB support, Docker secret support, new image tags, and deprecates the 'latest' Docker tag. The upgrade requires backing up the data volume before migrating, as the internal database schema changes and migration can take several minutes for large datasets. For those wanting to switch from SQLite to MariaDB, the process involves exporting the SQLite database, converting it using the sqlite3-to-mysql tool, and importing into a MariaDB container. The 'latest' Docker tag is now deprecated and users must explicitly pin to v2. Alpine-based images are also dropped in v2.

  10. 10
    Video
    Avatar of codetothemoonCode to the Moon·10w

    Rust Was Critical for SpacetimeDB

    The creator of SpacetimeDB explains why Rust was the only viable language choice for building the database. Key requirements included fine-grained allocation control (transactions must complete within microseconds, ruling out garbage-collected languages like Go), and compile-time memory safety guarantees essential for a multi-tenant environment where user code runs inside the database via WebAssembly. C and C++ were considered but lack Rust's safety properties. Zig was noted as an interesting alternative but not yet mature enough on safety.