Topic digest

SQL news and engineering summaries

Discover SQL best practices covering query optimization, database design, normalization, and relational database management. Our digest aggregates ACID compliance, transaction patterns, and distributed query from developer communities.

75 recent stories

Latest ranked stories

Current SQL stories

These stories are ranked from recent public source activity and shown as a preview of what a configured digest can deliver. Summaries are AI-generated; open the original source for full context.

02github.com

t8y2/dbx

t8y2/dbx

DBX is a lightweight, open-source, cross-platform database client that consolidates 100+ databases and middleware in a roughly 25 MB application. It combines desktop, Web, Docker, and CLI interfaces with an AI SQL assistant, MCP Server integration, schema/data tools, plugins, encryption, and safety controls—distinguished by broad coverage without runtime bloat.

03wozniak.ca

What ORMs have taught me: just learn SQL

The author argues that Object-Relational Mappers (ORMs) often cause more problems than they solve due to issues like attribute creep, complex foreign key joins, and the Object-Relational Impedance Mismatch. Instead of relying on ORMs for query generation, the author advocates for mastering SQL and treating the database as an API-driven data type.

04evanhahn.com

Prefer Strict Tables in SQLite

SQLite strict tables, introduced in version 3.37.0, enforce rigid data typing by preventing invalid type insertions and bogus column declarations. While strict tables add validation overhead and require table recreation for migration, they improve data integrity and prevent subtle bugs caused by SQLite's default flexible typing, despite the official advocacy for flexible schemas.

05rohanbansal.com

Training a 4B model to produce 81% faster query plans than Postgres

Training a 4B model to produce 81% faster query plans than Postgres

Rohan Bansal trained a 4B open-weights model with supervised fine-tuning and agentic reinforcement learning to improve PostgreSQL query plans through pg_hint_plan. Careful cache-noise control and custom rewards were essential. On the 113-query JOB benchmark, best-of-15 selection achieved 1.81× geometric-mean speedup and a 44.7% latency reduction versus PostgreSQL defaults, demonstrating niche domain training’s potential.

07heffree.dev

Please, I beg you, we need to stop using Stored Procedures (from applications)

The author argues that applications should usually avoid Stored Procedures, because parameterized queries and plan caching provide equivalent DBMS benefits while keeping database logic versioned with application code. They urge developers to learn SQL and collaborate with DBAs, emphasizing fewer network requests, indexes, profiling, ORM query inspection, avoiding N+1 and Cartesian explosions, and careful dynamic-query design, conversions, TVPs, and filtered indexes.

08andersmurphy.com

The perils of UUID primary keys in SQLite

Using random UUID4 as primary keys in SQLite leads to significant performance degradation due to B-tree rebalancing and increased paging. Performance testing reveals that UUID4 inserts are 10-12 times slower than integer primary keys. Switching to time-ordered UUID7 effectively mitigates these issues, bringing performance near baseline levels despite the larger byte size of UUIDs.

09hatchet.run

The startup's Postgres survival guide

This guide covers essential Postgres management for startups, emphasizing iterative schema design, performance-oriented querying with indices, and effective connection management. It covers intermediate topics like the query planner, query optimization with EXPLAIN ANALYZE, balancing autovacuum settings to prevent bloat, and advanced strategies such as partitioning and FOR UPDATE SKIP LOCKED to ensure production reliability.

10mort.coffee

SQLite should have (Rust-style) editions

The author argues that SQLite should adopt a versioned 'editions' system similar to Rust. Currently, SQLite’s default settings—such as disabled foreign key constraints, loose type affinity, and lack of busy-timeouts—often lead to bugs and poor performance. An edition-based approach would allow for modernizing global defaults while maintaining backward compatibility.

11greybeam.ai

DuckDB Internals: Why Is DuckDB Fast? (Part 1)

DuckDB Internals: Why Is DuckDB Fast? (Part 1)

DuckDB is a rapidly adopted, high-performance, in-process analytical SQL database designed for efficiency. Unlike server-based engines, it runs within the client application, avoiding network and serialization overhead. This analysis details its front-end architecture—covering parsing, binding, cost-based optimization, physical planning, and storage layer—explaining how it enables lightning-fast queries on formats like Parquet, CSV, and internal binary files.

13tigerdata.com

It's 2026, Just Use Postgres

It's 2026, Just Use Postgres

This article challenges the 'use the right tool for the right job' mantra that often leads developers to manage multiple specialized databases (Elasticsearch, Pinecone, Redis, etc.). Such sprawl creates technical debt, complex security models, and high operational costs. Instead, the author advocates for using PostgreSQL as a unified platform. Innovations like pgvector (vector search), TimeScaleDB (time-series), and pg_textsearch (BM25 search) allow Postgres to match specialized tools' performance using similar algorithms. This simplification is especially critical in the AI era, where maintaining consistent data for agents is easier within a single, atomic environment. The post concludes that 99% of companies can achieve their goals with Postgres alone, reducing architecture fragmentation and potential failure points.

14opensource.posit.co

ggsql: A Grammar of Graphics for SQL

ggsql: A Grammar of Graphics for SQL

Posit has released the alpha version of ggsql, a tool that implements the grammar of graphics using SQL syntax. It enables structured, code-based data visualization directly within SQL queries. Designed for performance and reproducibility, ggsql integrates with tools like Quarto and Jupyter, aiming to provide a powerful, language-agnostic visualization solution for data analysts and SQL users.

15raphaelbauer.com

PostgreSQL for Everything

PostgreSQL for Everything

PostgreSQL is presented as a stable, scalable, and versatile open-source RDBMS that can simplify IT by combining database, full-text search, JSON storage, queues, time-series processing, vector retrieval, caching, binary data handling, hierarchical queries, and JSON APIs. Extensions such as Timescale, pgvector, and pgai broaden its capabilities, often reducing the need for specialized systems.

17jon.chrt.dev

Things you didn't know about (Postgres) indexes

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.

18database-doctor.com

Joins are NOT Expensive

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.

19antithesis.com

What are skiplists good for?

What are skiplists good for?

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.

20analytics.fixelsmith.com

SQL patterns I use to catch transaction fraud

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.

Snapbyte.dev workflow

Get a SQL digest by email

Create a Snapbyte.dev digest and choose SQL as one of your topics.