Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>querydig: N+1 & Slow Query FinderNew to Visual Studio Code? Get it now.
querydig: N+1 & Slow Query Finder

querydig: N+1 & Slow Query Finder

milan Katira

|
1 install
| (0) | Free
Find N+1, unbounded and index-hostile database queries as you type. Prisma, Drizzle, Supabase, Mongoose, Django, SQLAlchemy, Rails, Laravel, Spring Data, GORM and raw SQL in JS/TS, Python, Go, Java, Ruby and PHP.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

querydig for VS Code

Find N+1 and slow database queries as you type. querydig flags queries inside loops, queries over another query's results (N²), writes in loops, unbounded reads, leading-wildcard LIKE, OFFSET pagination and 25+ more patterns, each with the reason and the fix.

Works in VS Code, Cursor, Windsurf and VSCodium, for:

Language Libraries
JavaScript / TypeScript Prisma, Drizzle, Kysely, Supabase, TypeORM, Sequelize, Mongoose, MongoDB driver, pg, mysql2, knex
Python Django ORM, SQLAlchemy, PyMongo, Motor, DB-API
Go GORM, xorm, database/sql, sqlx, pgx, mongo-go-driver
Java Spring Data JPA / MongoDB, Hibernate, JDBC, jOOQ
Ruby ActiveRecord, Sequel, Mongoid
PHP Laravel Eloquent, Doctrine, PDO, mysqli

Features

  • Inline diagnostics while you type or on save. Critical findings are errors, high ones warnings.
  • Quick fixes: safe automatic rewrites (.lean(), exists(), find_each, lazy()…), "Ignore this rule on this line", and "Explain rule" with a before/after example.
  • Workspace scan (querydig: Scan Workspace, or click the status bar): every file, plus your query health grade from A to F.
  • Respects your project: querydig.config.json rule overrides and ignores, // querydig-ignore QD001 comments, and skips tests, fixtures and migrations by default.
  • Local and private: the analyzer runs inside the editor. No account, no network, no database needed.

Settings

Setting Default
querydig.enable true Check open files
querydig.minSeverity low Hide findings below this severity
querydig.includeTests false Also check tests, fixtures, migrations and seeds
querydig.runOn type type or save

More than the editor

The same analyzer runs as a CLI (npx querydig), a GitHub Action with PR comments, an ESLint plugin, an MCP server for AI assistants, and can confirm findings against a read-only database replica. See querydig on GitHub or try it in your browser.

MIT licensed.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft