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 article demystifies the fifth normal form (5NF) by advocating for a logical design approach rather than traditional, confusing decomposition methods.
By starting with business requirements and clear logical models—specifically the AB-BC-AC triangle and the ABC+D star patterns—developers can create fully normalized database schemas without manual splitting or artificial constraints.
pg_textsearch is a high-performance PostgreSQL extension providing BM25 ranking for text search.
It features simple syntax, Block-Max WAND optimization for fast top-k queries, and parallel index builds. Designed for production, it supports PostgreSQL 17-18, partitioning, and configurable ranking parameters, making it a scalable alternative for textual information retrieval within the database.
This article demonstrates how to render and play a chess game using only SQL.
By utilizing a table to store piece positions, conditional aggregation to pivot data into an 8x8 grid, and basic CRUD operations to execute turns, the author shows that SQL is capable of complex game visualization and logic without frontend frameworks or JavaScript.
Geospatial joins, which use spatial predicates like ST_Intersects, often suffer from performance issues at scale due to their quadratic complexity.
While conventional joins utilize efficient hash partitioning, spatial predicates lack a clean join key, forcing expensive row-by-row comparisons. Floe addresses this by automatically rewriting queries to utilize H3 indexes, a hexagonal hierarchical tiling system that converts complex geometries into big-integer cell IDs. By representing shapes as sets of H3 cells, the system performs a fast integer equi-join as a pre-filter, followed by an exact spatial recheck to eliminate false positives. This method effectively reduces candidate pairs by up to 99 percent. Benchmark results show that optimizing H3 resolution can lead to speedups of nearly 400x compared to baseline queries, transforming expensive spatial operations into efficient parallel hash joins.
The l platform offers full compatibility with k4, q, and qSQL, enabling seamless integration without code rewrites.
It natively supports columnar tables, dictionaries, partitions, and splays, ensuring high performance and immediate interoperability for existing infrastructure.
This guide explores using DuckDB's Full-Text Search (FTS) extension to query large email datasets.
It covers preprocessing with Python and the usage of BM25 parameters, such as k1 and b, to tune ranking. While less feature-complete than Elasticsearch or Postgres, DuckDB provides an efficient, accessible solution for exploratory data analysis.
Torsten Grust provides comprehensive course materials on the internal architecture of DuckDB.
The 'DiDi' course, designed for undergraduate students at the University of Tübingen, covers 15 weeks of topics including memory management, vectorized query execution, indexing with ART, and query optimization, providing a deep dive into the kernel of the DuckDB relational database system.
Shaper is an open-source, SQL-driven business intelligence tool powered by DuckDB.
It allows developers to build analytics dashboards through SQL, supporting Git-based workflows and AI-ready features. Users can embed white-labeled analytics using JS and React SDKs, automate reports, and connect to multiple data sources. It is self-hostable via Docker and licensed under MPL 2.0.
TimescaleDB utilizes the hypercore engine, a hybrid row-columnar storage system, to achieve up to 98% compression on time-series data.
By grouping rows into batches and using specialized algorithms like delta encoding, Gorilla XOR, and run-length encoding, it outperforms native PostgreSQL TOAST mechanisms for IoT and financial datasets while simultaneously improving analytical query performance.
The author successfully imported the entire 20-year history of the Linux kernel into pgit, storing 1.4 million commits in a PostgreSQL database using delta compression.
This setup enables rapid, complex SQL querying of the entire history, revealing deep technical insights, development trends, and contributor patterns that would be labor-intensive to produce using standard Git tools.
Modern SQLite provides powerful features like native JSON support, FTS5 for full-text search, window functions for analytics, and STRICT tables for schema enforcement.
With generated columns, Write-Ahead Logging (WAL) for concurrency, and CTEs, SQLite has evolved into a robust, high-performance database suitable for complex applications without sacrificing its characteristic simplicity and reliability.
CTEs in PostgreSQL have evolved from 'optimization fences' into an efficient tool.
Since PostgreSQL 12, the planner automatically inlines most CTEs unless they are recursive, have side effects, or are referenced multiple times. While materialization can be useful for performance or atomicity, it often hides statistics from the query planner, occasionally leading to inefficient execution plans.
DuckDB’s columnar storage enables efficient analytical queries by reading only required columns and processing values in vectors.
It can query local or remote CSV and Parquet files in place, exploit partitioning and statistics, and provide concise SQL with `COLUMNS`, `GROUP BY ALL`, `FILTER`, `PIVOT`, window functions, `QUALIFY`, and `ASOF JOIN`. The post also recommends writing sorted, compressed, narrowly typed Parquet and using `EXPLAIN ANALYZE` to verify scan pruning and column selection.
Postgres 19 introduces native support for temporal tables, implementing SQL:2011 standards.
Using the WITHOUT OVERLAPS clause and FOR PORTION OF syntax, developers can now manage valid-time periods efficiently. This native approach replaces complex workarounds like GiST index exclusion constraints, simplifies data integrity for overlapping ranges, and introduces support for temporal foreign keys, significantly improving how Postgres handles time-sensitive data.
safe-not-safe is an offline tool for checking PostgreSQL migrations, using libpg_query compiled to WASM in a browser worker and offering a CLI.
In the shown empty-file run, it finds no statements and flags none. The interface says telemetry is disabled and links to GitHub.
the-stats-duck v0.6.0, an open-source DuckDB extension, enables advanced statistical analysis directly within SQL.
New features include meta() for data profiling, lm() for linear regression, bootstrap() for resampling, expanded plotting capabilities, and ten new statistical distributions. Performance for reading SAS, SPSS, and Stata files is significantly improved, offering a powerful, portable statistics engine.
Show HN: Streambed – Stream Postgres to Iceberg on S3, Supports Postgres Wire
Database · PostgreSQL · SQL
Streambed is a CDC engine that synchronizes PostgreSQL WAL changes to S3 as Iceberg tables.
It enables analytical querying without ETL or Spark by using a built-in query server based on DuckDB, which supports the PostgreSQL wire protocol for seamless connectivity.
PgQue is a zero-bloat, SQL-first event queue for PostgreSQL 14+.
By using snapshot-based batching and TRUNCATE-based rotation instead of row-level deletions, it avoids index bloat and VACUUM pressure. It supports event-driven fan-out, works on managed providers without extensions or sidecars, and offers an ACID-compliant alternative to traditional task queues like RabbitMQ.
Claude and DuckDB recreated a Star Trek: The Next Generation “Enterprise computer” by translating crew dialogue into SQL over a synthetic database modeled on ship records.
Using 11 scenes and the actual scripts, the system produced answers matching 40 of 49 dialogue results. Examples include detecting forged Stargazer logs, counting “Darmok” entries, narrowing substances through predicates, and correlating medical cases with visits. The downloadable enterprise_computer.duckdb database can be attached from the web and queried directly or used with Claude Code.
JetBrains embedded DuckDB in DataGrip to enable cross-database queries without building its own query engine.
DuckDB’s custom table functions connect its execution to DataGrip’s existing database functionality, allowing users to join PostgreSQL, MySQL, MongoDB, and other supported sources in one query without extra infrastructure. DataGrip exposes DuckDB’s SQL dialect and supports it as a first-class dialect. The initial implementation will evolve toward broader optimizations and file-based sources.