queryd - slow query detection for Node.js

queryd - slow query detection for Node.js

Startup Launched Apr 2026
Share:
queryd - slow query detection for Node.js social preview
Preview of queryd - slow query detection for Node.js

The Story

Latency budgets for the SQL your Node app actually runs.
queryd wraps the SQL your app actually runs — tagged templates (e.g. postgres.js), string SQL (wrapQueryFn), or Prisma via @olegkoval/queryd/prisma — with per-query latency thresholds, optional per-requestId query budgets, sampling, optional EXPLAIN ANALYZE, and pluggable sinks.

AI Overview

AI-generated
Catching database performance regressions before they reach users requires both visibility into query execution and the discipline to enforce latency budgets. Queryd addresses this gap by instrumenting SQL queries in Node.js applications with measurable performance guardrails. The tool wraps database clients at multiple levels—supporting postgres.js tagged templates, raw query functions, or Prisma—to intercept queries and measure their execution time against configurable thresholds.

The product solves a real pain point for teams building latency-sensitive applications. Query performance degrades gradually, and without systematic detection, slow queries often go unnoticed until they cause visible impact. Queryd brings three mechanisms to prevent this: per-query latency thresholds that flag individual slow queries, per-request query budgets that set cumulative limits on database work within a single user request, and sampling controls that keep observability costs minimal in production.

What distinguishes queryd is its pragmatic design philosophy. Rather than requiring a complete database abstraction or architectural restructuring, it integrates at the query execution layer across multiple driver APIs. The sampling-first approach acknowledges that continuous monitoring of all queries in high-traffic applications becomes prohibitively expensive; instead, teams can set sampling rates to stay within their observability budget while still surfacing meaningful regressions. Optional EXPLAIN ANALYZE integration allows deeper investigation of offending queries when needed, shifting between cheap signal and expensive detail.

The implementation provides useful context awareness through request-scoped budgets—tracking not just individual query times but also cumulative query volume and duration within a single request. This catches a different class of performance issues: endpoints that perform many quick queries instead of fewer optimized ones. The configurable sink architecture suggests thoughtful extensibility, allowing teams to route alerts to their existing monitoring systems rather than forcing a new workflow.

As an early-stage open-source project, queryd makes a modest but useful contribution to the Node.js observability ecosystem. It fills a specific niche—SQL query latency monitoring with minimal overhead—without attempting to be a comprehensive database performance platform. Teams already running SQL databases in production and concerned with query regressions will find the tool immediately applicable to their latency budgeting workflow.

Key Features

Multi-Driver Support

Integrates with postgres.js, raw queries, and Prisma without requiring database abstraction

Query Latency Thresholds

Flags individual queries that exceed configurable performance limits

Request-Scoped Budgets

Monitors cumulative query volume and duration within a single user request

Sampling Controls

Adjustable sampling rates keep observability costs minimal in production

EXPLAIN ANALYZE Integration

Enables deeper investigation of offending queries when needed

Use Cases

  1. 1

    Latency-Sensitive Applications

    Detects database performance regressions before they impact users

  2. 2

    High-Traffic Systems

    Sampling-first approach manages observability costs while surfacing meaningful regressions

  3. 3

    Teams with Latency Budgets

    Enforces systematic per-query and per-request performance guardrails

  4. 4

    Node.js Production Environments

    Provides query-level monitoring without requiring architectural restructuring

FAQ

What database drivers does queryd support?
Queryd supports postgres.js tagged templates, raw query functions, and Prisma.
How does request-scoped query budgeting work?
It tracks cumulative query volume and duration within a single request, catching endpoints performing many quick queries instead of fewer optimized ones.
Can queryd integrate with existing monitoring systems?
Yes, the configurable sink architecture allows teams to route alerts to their existing monitoring systems.
Does queryd add overhead to production?
No, configurable sampling rates let teams stay within their observability budget while still detecting performance regressions.

Pricing

Free

Open-source project with no commercial licensing.

Tech Stack & Tags

Discussion (1)

Oleg Koval
Oleg Koval 2 weeks ago

Guys! this is actually quite useful, please check it out and lets improve this product together as its open-source

Join the conversation — sign up to comment.

Sign up free
12

Community Support

Boost this project on Sell With boost

Meet the Founder

Oleg Koval

"10+ years shipping fintech APIs, AI features & OSS Lead engineer · open: full-time, fractional, f..."

Launch your own

Getting discovered has never been this beautiful.

Submit a Startup