Solving the 1+N Query Problem

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

AppSignal knows why the f*#k it crashed.
Stop vibe-debugging. Every exception, every backtrace, grouped so you see patterns, not noise.
www.appsignal.com
sponsored
Kargo - Stop Scripting Promotions. Start Shipping with Kargo
Kargo automates promotion across dev, staging, and prod with approval gates and verification. Open source, built by the team behind Argo CD. Download now.
akuity.io
sponsored
  1. joist-orm

    a TypeScript ORM for Postgres

    > trace optimizer/better sql in the next run

    Ah wow! I admittedly already linked this PR in another reply, but I'm trying similar things here:

    https://github.com/joist-orm/joist-orm/pull/1967

    Neat to hear you had success with it before; did you have to handle "the optimization was inaccurate [a novel codepath asked for a column we didn't return], so fallback to `select *`"? And do that without failing the overall request?

    This "fallback and implicit retry" is what I'm doing atm, and just assuming is the only way of handling the "novel codepath was hit this time" problem, but lmk if I'm missing something.

  2. AppSignal

    AppSignal knows why the f*#k it crashed. Stop vibe-debugging. Every exception, every backtrace, grouped so you see patterns, not noise.

    AppSignal logo
  3. haxl

    A Haskell library that simplifies access to remote data, such as databases or web-based services.

    Compare with the prior art of N+1 queries of 2014:

    https://github.com/facebook/Haxl/blob/main/example/sql/readm...

  4. souffle

    Soufflé is a variant of Datalog for tool designers crafting analyses in Horn clauses. Soufflé synthesizes a native parallel C++ program from a logic specification.

    reachable(a, c) :- edge(a, b), reachable(b, c).

    'Base datalog' guarantees termination by requiring all input relations to be finite. Notably this means that it doesn't have numerical operations like addition or multiplication, since `plus(a, b)` or `times(a, b)` would be infinite relations.

    More practical Datalog engines like Souffle (https://souffle-lang.github.io/) don't guarantee termination.

    Recursive queries are not needed by most applications, but maybe Arcadia could allow them (compiling to recursive CTEs) by proving that recursion only goes through finite relations.

  5. Rezoom.SQL

    Statically typechecks a common SQL dialect and translates it to various RDBMS backends

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Show HN: Pg-typesafe – Strongly typed queries for PostgreSQL and TypeScript

    8 projects | news.ycombinator.com | 17 Feb 2026
  • Idiomatic way to interact with database

    2 projects | /r/fsharp | 9 Apr 2023
  • Warning FS0101: This API supports the FSharp.Data.SqlClient...

    3 projects | /r/fsharp | 28 Oct 2022
  • Is there a market for a complete fsharp ORM library?

    4 projects | /r/fsharp | 10 Jul 2022
  • If you were to create a Web API today from scratch how would you do it ?

    7 projects | /r/dotnet | 2 Apr 2022