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.
| |