Best of SQLFebruary 2026

  1. 1
    Article
    Avatar of freecodecampfreeCodeCamp·16w

    Harvard CS50 2026 – Free Computer Science University Course

    Harvard's CS50 2026 course is now available as a free 25-hour video series covering fundamental computer science concepts. The course teaches algorithmic thinking and problem-solving through multiple programming languages including C, Python, SQL, HTML, CSS, and JavaScript. Topics span algorithms, data structures, memory management, web programming, and a new section on artificial intelligence's impact on computer science. Taught by David J. Malan, the course is designed for beginners with no prior programming experience.

  2. 2
    Article
    Avatar of Marmelabmarmelab·13w

    9 Advanced PostgreSQL Features I Wish I Knew Sooner

    A practical tour of nine underused PostgreSQL features that can replace complex application-level logic with native database capabilities. Covered features include EXCLUDE constraints for preventing overlapping ranges, CHECK constraints for row-level validation, GENERATED columns for derived data, DISTINCT ON as a concise alternative to GROUP BY, the FILTER clause for conditional aggregates, PARTITION BY window functions, ON CONFLICT upserts, composite types for structured nested data, and recursive CTEs for traversing hierarchical data. Each feature is illustrated with concrete use cases and SQL examples, along with relevant limitations and links to official documentation.

  3. 3
    Article
    Avatar of hnHacker News·15w

    How we made geo joins 400× faster with H3 indexes

    Geospatial joins using predicates like ST_Intersects become prohibitively slow at scale due to quadratic complexity and expensive spatial operations. By automatically rewriting these queries to use H3 hierarchical hexagonal cell indexes, spatial predicates are transformed into fast integer equi-joins on cell IDs. The approach generates H3 coverage for geometries, performs a hash join on matching cells, then applies exact predicates only to filtered candidates. Benchmarks show 400× speedup at optimal resolution (resolution 3), reducing 37.6 million comparisons to ~200k. The technique works on-the-fly without materialized indexes, supporting views and subqueries while avoiding storage overhead.

  4. 4
    Article
    Avatar of ardlbsArdan Labs·15w

    Query Database Using Plain English

    Build a natural language database query system in Go using LLMs. The tutorial demonstrates a two-step architecture: first prompting an LLM to generate SQL from plain English questions, then querying the database and having the LLM format results into natural language answers. Uses Kronk model server (OpenAI-compatible) with the Ministral model, DuckDB for data storage, and includes complete working code with prompt engineering examples for converting user questions into SQL queries and formatting database results.

  5. 5
    Article
    Avatar of systemdesigncodexSystem Design Codex·13w

    How to Prevent the DB from Becoming a Bottleneck

    Databases often become performance bottlenecks even when application code is well-optimized. This guide covers diagnosing DB slowdowns using query profiling (EXPLAIN ANALYZE, slow query logs) and key metrics, then addresses fixes at two levels: query optimization (proper indexing, avoiding SELECT *, using JOINs over nested queries) and architectural improvements (schema normalization vs. denormalization, caching with Redis/Memcached, connection pooling with pgbouncer, materialized views, sharding/partitioning, and read replicas). The core advice is to profile first, then apply targeted optimizations rather than guessing.

  6. 6
    Video
    Avatar of devopstoolboxDevOps Toolbox·15w

    I was using Postgres wrong this whole time

    TimescaleDB transforms PostgreSQL into a high-performance time-series database through an open-source extension. The tutorial demonstrates core features including hyper tables (automatic data chunking by time), compression with delta encoding, time buckets for aggregating data at various intervals, and continuous aggregates that incrementally refresh materialized views. These capabilities enable PostgreSQL to handle millions of data points per second with 90% better compression than specialized NoSQL tools, while maintaining familiar SQL syntax and compatibility with existing PostgreSQL extensions.