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.
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.
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.
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 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.
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.
Defines a governed workflow for Data Analytics artifacts: validate complete manifests and bounded snapshots before rendering, use native MCP or Work Mode delivery paths appropriately, preserve provenance, enforce chart and table schemas, provide exploration-ready data, and fall back to static outputs only when necessary.
It also specifies titles, subtitles, metadata, sorting, and sharing requirements.
SQL is a uniquely durable programming language based on relational algebra, allowing queries written decades ago to function in modern systems like PostgreSQL.
Unlike fast-evolving frameworks such as JavaScript, SQL offers career longevity through its mathematical foundation. While it has legacy flaws, mastering core SQL remains the most valuable long-term investment for software developers.
DuckLake is an open lakehouse format and DuckDB extension that separates metadata from data: a catalog database stores metadata, while Parquet files store table data.
It lets DuckDB attach DuckLake databases and use standard SQL to create, query, update, and evolve tables. Built-in capabilities include time travel and change data feeds, distinguishing it from a simple Parquet-based storage layer by providing integrated cataloging and versioned data operations.
sqldef is an innovative command-line interface tool designed to streamline database schema management by performing diff operations between two SQL schemas.
Unlike traditional migration tools that require managing stateful migration files, sqldef allows developers to update their relational database management systems by comparing a desired SQL schema with the current live state. The tool provides robust support for a wide range of popular databases, including MySQL, MariaDB, TiDB, PostgreSQL, SQL Server, and SQLite3. By generating the necessary DDL statements to reconcile differences, it simplifies the Continuous Integration and deployment lifecycle for backend developers. Additionally, an online demo environment utilizes a WebAssembly build of sqldef, enabling users to experiment with schema comparisons and DDL generation directly within a web browser without local installation.
This article explores database transactions, explaining atomicity through BEGIN, COMMIT, and ROLLBACK.
It compares Postgres's multi-versioning (MVCC) and VACUUM processes against MySQL's undo logs. Additionally, it details isolation levels—Serializable, Repeatable Read, Read Committed, and Read Uncommitted—and how both systems handle concurrent writes using locking or optimistic serialization.
Postgres 19 introduces 'plan advice' through two new modules, pg_plan_advice and pg_stash_advice, effectively adding query hints.
Unlike traditional implementations, these keep advice outside SQL, guide rather than replace the planner, and provide granular feedback. This design addresses long-term community concerns regarding maintenance and the importance of allowing DBAs a graceful escape hatch for problematic queries.
What Changes When You Upgrade from PostgreSQL 18 to 19
Backend · Database · Performance · PostgreSQL · SQL
PostgreSQL 19 brings measurable day-to-day improvements over 18: foreign-key batch inserts were 41.1% faster, and eligible NOT IN queries were 24.5% faster in tests.
Native REPACK CONCURRENTLY reclaims space online, pg_plan_advice exposes and tests planner choices, and ON CONFLICT DO SELECT returns existing rows in one round-trip. WAIT FOR LSN helps replicas catch up before reads. Upgrade checks include extensions, removed io_workers, disabled-by-default JIT, lock settings, and logical-replication sequence synchronization.
TIN, a GA full-text search extension for Postgres, supports Boolean, phrase, span, fuzzy, wildcard, regex, folding, COUNT(*) and BM25 ranking while handling updates, MVCC, replication, backups, and joins.
Benchmarks show at least 8× higher throughput than alternatives. Its speed comes from using Postgres ctid identifiers, vectorized bitmaps, and efficient segment merging.
Can GROUP BY still be optimized after all these years?
Algorithms · Big Data · Database · Performance · SQL
Pivot found a significant optimization for top-K GROUP BY queries, such as finding the 10 items with the most orders.
Conventional analytical databases aggregate rows into private per-thread hash tables, merge partition results, and concatenate them, even though only a few partitions may affect the final answer; with 4,096 partitions, at least 4,086 are irrelevant to a top-10 result. The proposed approach tracks partition-level aggregate information, potentially using Bloom filters or counters, to prune unnecessary work.
Co-locating workflow state within the same Postgres database as application data enables atomic updates.
By bundling database changes and workflow checkpoints into single transactions, developers can guarantee exactly-once execution and simplify complex patterns like idempotency and outbox messaging, ultimately enhancing reliability and reducing the overhead typically found in distributed workflow systems.
Postgres 19, currently in beta, introduces significant improvements including native REPACK CONCURRENTLY, partition merging and splitting, and enhanced logical replication.
New features like SQL property graph queries and SQL syntax upgrades improve developer productivity, while autovacuum and planner enhancements boost database maintenance and performance. These updates strengthen Postgres as a versatile and manageable production-ready system.
Planet Labs operates multiple satellite constellations, collecting daily global land imagery, including Pelican’s 426-band hyperspectral data.
Its open Disaster Data feed provides pre- and post-event imagery with STAC metadata. Using DuckDB, GDAL, QGIS, Parquet and GeoTIFF workflows, the analysis catalogs, mosaics, compresses and evaluates disaster imagery, including 24 Nepal flood scenes published as quickly as 1.4 hours after capture.
Mendral (YC W26) utilizes a SQL interface and ClickHouse to empower AI agents to investigate flaky CI tests.
By denormalizing 48 metadata columns per log line, they achieve 35:1 compression and millisecond query latency. This architecture allows agents to autonomously scan billions of log lines, identifying root causes across months of history in seconds.
Floe explains using bloom filters, probabilistic data structures that efficiently speed up SQL queries by filtering non-matching rows before decompression.
By implementing a fixed-size 256KB filter with two bits stored in a single uint32, they reduced false positive rates by 2x (11.7% to 5.7%) with negligible performance costs, significantly optimizing database join operations.
In PostgreSQL, row-level DELETE operations create bloat by adding dead tuples and increasing vacuuming demand.
They do not immediately reclaim disk space. For large-scale data cleanup, scaling strategies favor DROP TABLE or TRUNCATE, as they efficiently release space at the OS level. Partitioning is recommended to transform bulk deletions into manageable, recurring table maintenance tasks.