Topic

Database

Follow database news across PostgreSQL, MySQL, SQLite, Redis, MongoDB, query optimization, schema design, and operational lessons. Snapbyte.dev turns database discussions into ranked summaries for developers.

What this topic tracks

  • Database releases and ecosystem updates
  • Query optimization, indexing, and schema design
  • PostgreSQL, MySQL, SQLite, Redis, and MongoDB
  • Replication, migrations, and reliability
  • Production data architecture lessons

Database · 300 stories

Recent stories

Each story's summary, with the places it was discussed.

Summaries are written by AI from the linked sources. Open the source for full context.

20 stories

AliSQL: Alibaba's open-source MySQL with vector and DuckDB engines

github.com · 3 Feb

Database · MySQL · Open Source

AliSQL is Alibaba's specialized open-source branch of MySQL, specifically forked and optimized for massive-scale production environments.

The latest release, version 8.0.44 (LTS), introduces significant enhancements including the native integration of DuckDB as a storage engine, which provides users with lightweight analytical capabilities using standard SQL interfaces. Furthermore, AliSQL now supports enterprise-grade vector storage with up to 16,383 dimensions, utilizing an optimized HNSW algorithm for high-performance Approximate Nearest Neighbor search, making it a powerful tool for AI-driven applications like semantic search. The project roadmap includes ambitious improvements to DDL efficiency, recovery time objectives (RTO), and replication throughput via parallel processing. These features aim to reduce latency and eliminate replication lag, ensuring high availability and stability for modern, data-intensive organizations.

How Oracle's Secret Algorithm Came into the Public Domain After Patent Expiration, Making Sorting 5x Faster for Open-Source Databases and Boosting Performance for AWS and Other Cloud Companies

deepsystemstuff.com · 6 Jul

Database · MySQL · PostgreSQL

Oracle's Orasort algorithm, which boosts database sorting speeds by comparing 8-byte segments as 64-bit integers instead of character-by-character, has entered the public domain following its 20-year patent expiration.

This efficient method reduces CPU cycle consumption, now enabling open-source databases like MySQL and PostgreSQL to optimize performance and lower operational costs in cloud environments.

Postgres isn't slow, your storage is

clickhouse.com · 12 Oct

Backend · Database · Performance · PostgreSQL · Software Architecture

Sai Srirampur’s POSETTE 2026 benchmark found the same 3.3-billion-row PostgreSQL UPDATE workload achieved median 16,030 TPS on local NVMe versus 1,734 on baseline gp3 EBS, with latency falling from 36.9 ms to 4.0 ms.

EBS spent most extra time waiting for storage, contributing to slow ingestion, read latency, VACUUM, checkpoints, and replication lag. Production use requires two synchronous standbys across availability zones, plus Object Storage base backups and continuous WAL archiving for failover and recovery.

Asynchronous I/O in DuckDB: Work, Thread, Work

duckdb.org · 10 Aug

Cloud Computing · Database · Performance

DuckDB v2.0, planned for fall 2026, will make asynchronous I/O default for Parquet and seekable UTF-8 CSV, using dedicated ASYNC threads, read-ahead, and memory governance to overlap remote fetches with computation.

On S3, benchmarks show nearly 3× faster Parquet and 20× faster CSV queries; cold local reads improve modestly. JSON and native formats are planned.

SQL patterns I use to catch transaction fraud

analytics.fixelsmith.com · 12 May

Data Science · Database · SQL

This guide outlines six SQL patterns for detecting transaction fraud, including velocity checks, geographic impossibility, amount anomalies, merchant behavior analysis, off-hours tracking, and the use of window functions for rapid iteration.

These techniques help identify suspicious activity in financial or benefit-related datasets, emphasizing that SQL remains the most effective tool for practical, scalable fraud detection.

Neki

planetscale.com · 10 Sept

Database · Distributed Systems · SQL

PlanetScale has launched Neki in platform preview, a sharded Postgres service that scales across machines while retaining real Postgres on every shard.

Its router preserves standard drivers and ORMs; built-in topology, pooling, failover, online schema changes, upgrades, imports, and resharding simplify operations. It supports unsharded deployment, but preview users should avoid production workloads.

What would Postgres do?

planetscale.com · 2 Dec

Backend · Database · Distributed Systems · PostgreSQL · Testing

Neki validates its sharded Postgres behavior by treating vanilla Postgres as an oracle: identical queries, data, and protocol interactions must produce identical results or errors.

Differential tests explore plan variants created by changing statistics, planners, sharding topologies, and simple/extended text/binary protocols. Across about 9,800 workload queries, a recent CI run executed 37,000 variants; this exposed real correctness bugs, including incorrect volatile CTE evaluation, while fuzzing found over 70 more bugs.

Building PlanetScale with Insights Agent

planetscale.com · 19 Nov

Backend · Database · MySQL · Performance · AI Agents

PlanetScale used its own Rails API to test and improve Insights Agent, which detects inefficient queries or schema, traces code, and opens fixing pull requests.

It cut feature-flag database calls from 28.7 million to 8.3 million daily, reducing database time by 71%. An initially harmful index exposed missing context about empty results and expanded IN lists; filtering in Ruby cut database time 14x. Another composite index reduced query latency from seconds to milliseconds. Insights Agent now evaluates rows, SQL size, and when no change is best.

Designing a reliable unplanned failover

planetscale.com · 5 Nov

Backend · Database · Distributed Systems · PostgreSQL · Software Architecture

Neki’s unplanned Postgres failover uses replica evidence rather than Admin’s health check alone.

It declares a primary dead only when reachable replicas report broken replication without contradiction, then disconnects them to prevent the old primary from returning and to freeze WAL positions. It promotes the replica with the highest received, preferably fully replayed, WAL, reconfigures the shard, and tears down the old primary. Synchronous `ANY 1` durability helps establish write unavailability, while TCP and WAL receiver timeouts detect silent or frozen failures.

Designing a planned switchover for minimum disruption

planetscale.com · 29 Oct

Backend · Database · Distributed Systems · PostgreSQL · Software Architecture

Neki minimizes planned Postgres primary switchovers by validating candidates beforehand, establishing a final WAL position, preserving synchronous replication, and buffering primary-bound queries.

Admin makes the old primary read-only, disconnects other replicas, waits for the target to replay all required WAL, prepares replication, and promotes it only when safety checks pass. Routers then replan buffered queries, so applications usually see delay rather than errors. A deadline enables rollback to the old primary, while acknowledged commits remain durable.

Shard design doesn't start from your tables

planetscale.com · 23 Oct

Backend · Database · Distributed Systems · PostgreSQL · Software Architecture

Neki shard-group design should start from query and transaction patterns, not table structure.

Tables sharing a key can be co-located across Postgres shards using a common shard index, keeping joins and transactions local and preserving full single-shard semantics. Reference tables are replicated to every shard, while differently keyed data can use separate groups. Global secondary indexes support lookups without shard keys. MoveTables and Reshard later change placement, shard keys, or shard counts as workloads evolve.

I don't trust ON DELETE CASCADE

planetscale.com · 21 Oct

Backend · Database · Performance · PostgreSQL · SQL

ON DELETE CASCADE can turn simple deletions into outages and replication failures as foreign-key trees grow.

A cascading delete removes matching rows in one transaction, generating dead tuples, index updates, and WAL while holding locks; migrations may queue writes, unindexed keys can trigger scans, and logical replication can leave orphans or fail without replica identity. Soft deletes avoid this by marking one row, then reaping descendants in small background batches, keeping transactions short and bounded.

Neki update: $50 Metal, read-only replicas, Azure, and more

planetscale.com · 20 Oct

Backend · Database · DevOps · Distributed Systems · PostgreSQL

Neki, PlanetScale’s sharded Postgres, added read-only replicas, Metal nodes starting at $50/month, Azure regions, and broader Terraform, CLI, MCP, and configuration support during its platform preview.

The query layer now supports more SQL, standard exports via COPY, and EXPLAIN (NEKI_PG_PLAN); distributed INSERT ... SELECT is 76x faster and COPY ingest 5x faster than launch. More than 650 changes have shipped, enabling evaluation for production workloads.

TimeSeries Tiered Storage Journey: Kafka/Flink Streams to Native Cassandra Cold Reads

netflixtechblog.com · 14 Oct

Backend · Big Data · Database · NoSQL · Software Architecture

Netflix evolved its TimeSeries tiered storage from an Apache Kafka/Flink pipeline writing compacted Parquet to S3 into native Cassandra cold reads from existing S3 backups.

Immutable Time Slices use ReadOnlyCompactionStrategy to align SSTables, while custom backup Memtables cache metadata locally and fetch data chunks on demand. An optional separate Cassandra cold cluster protects hot traffic. The system now stores over 15 PB, reduced disk usage from 80% to 7%, improved p90 latency by ~30%, and keeps p99 below 500 ms.

Sequences and other volatiles in Neki

planetscale.com · 14 Oct

Backend · Database · Distributed Systems · PostgreSQL · SQL

Neki implements PostgreSQL sequences in its sharded query planner by making sequence operations router-only and coordinating allocation through an authoritative shard.

Because nextval() is volatile, Neki must evaluate it once per output row, even when rows arrive from multiple shards, while stable expressions such as now() are evaluated once per statement. Shard-local joins and immutable expressions can still be pushed down. For UPDATE, Neki locks and streams row IDs to the router, then sends parameterized per-row updates with globally unique sequence values.

PlanetScale is now available on Azure

planetscale.com · 13 Oct

Azure · Backend · Cloud Computing · Database · DevOps

PlanetScale is now available on Microsoft Azure, initially supporting PlanetScale Postgres and Neki databases in centralus, eastus2, and westeurope; Vitess is not yet supported.

Azure deployments include high availability across three availability zones, Query Insights, schema recommendations, automated backups, and Metal clusters. PlanetScale built custom Kubernetes networking that assigns pod IPs in /28 blocks, increasing capacity 16x to over one million pod IPs per network. Existing databases can be migrated through support.

PostgreSQL Bloat Is a Feature, Not a Bug

rogerwelin.github.io · 16 Feb

Database · Linux · Performance

This article explores PostgreSQL bloat, explaining how MVCC and the physical storage layer (Pages and Tuples) lead to dead space during UPDATE and DELETE operations.

It details the performance impact of accumulated dead tuples and provides practical solutions using VACUUM, REINDEX, and autovacuum tuning to manage database size and efficiency effectively.

Why DuckDB is my first choice for data processing

robinlinacre.com · 23 Aug

Database · Python · SQL

DuckDB is an open source in-process SQL engine optimized for analytical queries (OLAP), offering performance up to 1,000 times faster than traditional transactional databases like Postgres for large datasets.

Its lightweight nature as a single binary makes it easy to install and integrate into Python environments via pip. DuckDB simplifies data engineering by allowing direct querying of various file formats like parquet, csv, and json, even from remote sources like S3. Key advantages include ergonomic SQL extensions such as EXCLUDE and COLUMNS, ACID compliance for bulk operations, and high-performance custom UDFs. Its zero-startup time makes it ideal for CI/CD pipelines, significantly improving the developer experience compared to heavier alternatives like Spark.

Scaling PostgreSQL to power 800M ChatGPT users

openai.com · 22 Jan

Database · Distributed Systems · PostgreSQL

OpenAI has successfully scaled its PostgreSQL infrastructure to support 800 million users and millions of queries per second for ChatGPT and its API.

Despite a 10x surge in load over the past year, OpenAI utilizes a single-primary architecture on Azure PostgreSQL with nearly 50 read replicas globally. The engineering team implemented extensive optimizations, including offloading read traffic to replicas, using PgBouncer for connection pooling, and employing cache locking to prevent read storms. To manage write-heavy workloads that challenge PostgreSQL's MVCC implementation, OpenAI migrated shardable data to Azure Cosmos DB. This strategy prioritizes operational stability, achieving 99.999% availability while maintaining low latency across distributed regions. Future plans include cascading replication and further migration of write-heavy workloads to specialized sharded systems.

In praise of memcached

jchri.st · 23 Jun

Database · Redis · Software Architecture

Sysadmins often adopt Redis as a cache, only to see developers misuse it as a primary database.

The author argues that memcached is a better choice for caching due to its stateless design, superior client-side clustering, and operational simplicity, which naturally enforces the intended use as a volatile cache rather than a persistent data store.

Where it came fromPlanetScaleHacker NewsRedditNetflix TechBlogCreate a database digest for storage, query, and production data-system stories that matter to your work.Build your digest