We are thrilled to announce the official v1.0.0 release of QueryPerf!
QueryPerf is a static analysis tool that intercepts bad AI-generated database code at the moment it's written. By auditing your Prisma schema alongside your database queries, QueryPerf catches structural performance anti-patterns before they ever reach production.
Features included in v1.0.0
- N+1 Query Detection: Automatically identifies queries inside loops (
for/map/forEach) that should be refactored into batch operations or.include(). - Missing Index Detection: Scans
.findUnique,.findFirst, and.whereclauses against yourschema.prismato catch slow queries missing proper@uniqueor@@indexattributes. - Select-Star Bloat: Flags queries fetching massive payloads without using
selectto narrow down the returned columns. - Unpaginated List Risk: Detects
.findMany()calls lackingtakeorskiplimits. - Cascade Risk: Identifies
deleteoperations on tables with cascading relations that could cause unintended data loss.
💻 Quickstart
Add this to your GitHub Actions workflow (.github/workflows/audit.yml) to automatically scan incoming PRs:
name: Database Performance Audit
on: [pull_request]
jobs:
queryperf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run QueryPerf
uses: WebToolkit-Pro/queryperf@v1.0.0
with:
schema-path: './prisma/schema.prisma'
query-glob: 'src/**/*.ts'
🎨 Web Application
We also launched the QueryPerf Web App, featuring a high-density, terminal-inspired interface for live code analysis. Try the live sandbox directly at our Vercel deployment.