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

I decided to make a worse UUID for the pettiest of reasons.

gitpush--force.com · 19 Jan

Backend · Database · Go

The author introduces smolid, a custom 64-bit ID scheme developed in Go as a more compact alternative to UUID.

While it sacrifices global uniqueness by reducing entropy to prioritize shorter URLs and temporal ordering, it offers unique features like embedded type identifiers and native compatibility with 8-byte integers. Despite its limitations, such as a custom epoch ending in 2094 and collision risks at high throughput, it serves as a specialized tool for projects where aesthetic URLs and database index locality are preferred over the vast entropy of standard UUIDs.

timescale/pg_vectorsearch

github.com · 14 Oct

Artificial Intelligence · C · Database · Performance · PostgreSQL

pg_vectorsearch is an alpha PostgreSQL extension for high-performance approximate nearest neighbor (ANN) search.

Its PRISM index targets datasets exceeding 100 million vectors, using hierarchical routing, RaBitQ quantization with theoretical error bounds, SIMD-optimized distance computation, and PostgreSQL buffer caching. It supports inserts, updates, deletes, rebalancing through prism_rebalance, and existing pgvector vector or halfvec columns. Two-stage filtering reduces full-precision reranking while preserving recall and improving query and index-building speed.

Valkey kills the skiplist, cuts sorted set overhead by up to 43%

valkey.io · 17 Nov

Algorithms · Backend · Database · NoSQL · Performance

Valkey 9.2 replaces the skiplist backing large sorted sets with fbtree, a 61-way B+ tree variant.

By packing entries into contiguous nodes, linking leaves, using SIMD feature lookups, and optimizing sequential inserts and endpoint pops, fbtree reduces ordered-index overhead 36–43% for 5 million 20-byte members, saving up to 109 MB. Benchmarks report +105% ZADD and +76% ZREM throughput, while command behavior remains unchanged; only OBJECT ENCODING changes from skiplist to btree.

Andy Pavlo Joins ClickHouse to Establish ClickHouse Labs

clickhouse.com · 3 Aug

Artificial Intelligence · C++ · Database

A prominent Carnegie Mellon professor is joining ClickHouse to lead ClickHouse Labs, a new research division.

The team aims to advance database technology by bridging academic research and industrial application. Primary focuses include innovating ClickHouse and PostgreSQL architectures, optimizing performance, and exploring the integration of DBMS solutions with emerging AI and agentic technologies.

SQLite improving performance with pre-sort

andersmurphy.com · 7 Jun

Database · Performance · SQLite

Inserting random data into SQLite, like session tokens, degrades performance due to B-Tree page splits and re-balancing.

This analysis demonstrates that pre-sorting batches of random data before insertion significantly improves write throughput. By sorting data in-memory before writing, performance gains of two to three times are achieved, mitigating the overhead caused by unordered primary keys.

Just Use Postgres for Durable Workflows

dbos.dev · 28 May

Database · Distributed Systems · PostgreSQL

Durable workflows improve reliability by checkpointing task progress to a database.

While traditional systems use complex external orchestrators, this article proposes building durable workflows directly on Postgres. By leveraging Postgres for state management, coordination, and observability, developers can reduce infrastructure complexity, improve scalability, and unify security policies without adding new single points of failure.

Ten years of ClickHouse in open source

clickhouse.com · 15 Jun

C++ · Database · Open Source

ClickHouse, which began as a 2009 internal tool for web analytics, has become a leading open-source analytical database.

Built from scratch in C++, it emphasizes modular, well-documented code and a transparent development process. Its evolution from custom prototypes to a high-performance, globally adopted DBMS demonstrates the power of open-source collaboration and engineering discipline.

Redis array: short story of a long development process

antirez.com · 4 May

Artificial Intelligence · Database · Redis

The author implemented a new Array data type for Redis, utilizing AI tools like GPT-5.x for system programming, specification design, and testing.

This approach enabled a complex, optimized memory structure with sparse arrays. The author emphasizes that while AI acted as a force multiplier and safety net, human oversight remained essential for high-quality software architecture.

Bunny Database

bunny.net · 3 Feb

Cloud Computing · Database · SQLite

Bunny Database has launched in public preview, offering a managed SQLite-compatible database service designed to bridge the gap between complex self-managed VMs and expensive DBaaS platforms.

Built on a fork of libSQL, it features a serverless-like architecture that spins down when idle to save costs while utilizing 41 global regions to minimize latency via data locality. Key features include one-click deployment, SDK support for major languages like TypeScript, Go, and Rust, and a pay-as-you-go pricing model based on actual reads, writes, and storage. The service emphasizes developer experience with integrated metrics, a database editor, and seamless integration with edge computing environments like Bunny Edge Scripting. During its preview phase, the service is free to use, allowing for up to 50 databases per account.

Introduction to PostgreSQL Indexes

dlt.github.io · 11 Sept

Database · Performance · PostgreSQL

This comprehensive guide to PostgreSQL indexes explores their internal mechanics, storage on disk using heap files and 8KB pages, and the tradeoffs associated with their use.

It details how the query planner decides between sequential and index scans and emphasizes the costs of indexing, including disk space, memory usage, and impact on write operations. The article breaks down various index types, such as B-tree, Hash, BRIN, GIN, GiST, and SP-GiST, while also covering advanced strategies like partial, covering, multi-column, and expression indexes for specialized optimization.

Making Postgres 300x faster for analytics: batching, operator fusion, and SIMD

malisper.me · 3 Aug

Database · Performance · Rust

pgrust 0.2 introduces significant performance gains, operating up to 300x faster than Postgres on analytical benchmarks.

By replacing the traditional Volcano model with optimizations like batching, operator fusion, and SIMD, the project modernizes database execution for modern hardware, focusing on CPU and memory efficiency to surpass traditional bottlenecks found in legacy systems.

Every GitHub object has two IDs

greptile.com · 13 Jan

Database · GitHub · GraphQL

When building a feature for Greptile, an AI-powered code review tool, the engineering team encountered a challenge with GitHub's dual identification systems.

They needed database IDs (integers) to generate clickable URLs for pull request comments, but their database only contained GraphQL node IDs (base64 strings). Instead of performing a massive data migration, they reverse-engineered the node ID structure. By decoding the base64 strings, they discovered that GitHub uses MessagePack to serialize arrays containing repository and object IDs. This finding allowed them to extract the required 32-bit database IDs directly from the node IDs using a simple bitmask and the MessagePack protocol. The investigation also revealed legacy ID formats and the complexities of GitHub's internal transitions from string-based enums to structured binary identifiers.

Show HN: PgDog – Scale Postgres without changing the app

github.com · 23 Feb

Database · PostgreSQL · Rust

PgDog is an open-source, high-performance PostgreSQL proxy written in Rust.

It offers advanced connection pooling, load balancing, and sharding capabilities. Featuring application-layer routing, health checks, and automatic failover, it supports complex cross-shard queries and online re-sharding. It is designed for scalability on commodity hardware and integrates with Kubernetes, AWS RDS, and Terraform.

Queryable Executables

fzakaria.com · 24 Aug

Backend · Database · Software Architecture

SELF turns executables into SQLite databases, allowing programs to query and transactionally update their code, content, configuration, and runtime state in one file. self-httpd demonstrates a self-contained webserver with routes, logs, and live edits. binfmt_misc and argv[0] enable self-access, while SQL tooling supports deployment migration, auditing, and search.

Things you didn't know about (Postgres) indexes

jon.chrt.dev · 15 Apr

Database · PostgreSQL · SQL

Database indexes speed up read operations by acting like sorted references, similar to a book index.

However, they introduce overhead for writes and storage. Key optimization strategies include understanding composite indexes, using functional indexes for expressions, implementing partial indexes for filtered datasets, and leveraging covering indexes for index-only scans. Always measure performance using EXPLAIN and EXPLAIN ANALYZE.

Joins are NOT Expensive

database-doctor.com · 30 Mar

Database · Performance · SQL

This analysis challenges the misconception that frequent database joins are expensive, instead showing they are efficient and scalable.

Using DuckDB and PostgreSQL benchmarks, it demonstrates that 'One Big Table' (OBT) models often consume more CPU due to data reassembly and projection costs. Dimensional modeling, as advocated by Ralph Kimball, remains superior for analytical performance.

DuckDB 2.0.0 LTS "Cinnamon Teal"

duckdb.org · 21 Oct

Database · SQL

DuckDB 2.0.0 LTS, codenamed “Cinnamon Teal,” is its largest feature release, built through nearly 20,000 commits since 1.5.

It adds a polished Quack client-server protocol, CONNECT, asynchronous Parquet/CSV I/O, first-class VARIANT, CLI agent mode, extensible PEG parser, C API v2, triggers, and SQL additions including NEAREST joins. It requires C++17, supports through at least October 2027, and introduces storage compatibility considerations: pre-2.0 versions cannot read files created by 2.0.

What are skiplists good for?

antithesis.com · 16 Apr

Data Science · Database · SQL

A skiplist is a randomized data structure providing logarithmic performance via layered, probabilistic links.

The author describes solving a complex tree-traversal problem in a data warehouse by inventing a 'skiptree'—a hierarchical structure of skiplists stored in SQL tables. This technique enabled efficient ancestor lookups using joins, demonstrating how exotic data structures can solve unique database performance challenges.

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