Added
- Offline migration and DDL linter (
culprit lint-sql, MCPlint_sql, SQL editor). Lint.sqlmigration files or wholemigrations/directories offline against a saved snapshot's table sizes, row counts, column types, indexes, constraints and active workload. Detects blockingCREATE INDEX,DROP INDEXandALTER TABLElocks across PostgreSQL (CONCURRENTLY,NOT VALID), SQL Server (ONLINE = ON,WITH NOCHECK) and MySQL / MariaDB (ALGORITHM=INSTANT,ALGORITHM=INPLACE, LOCK=NONE), unindexed or type/collation-mismatched foreign keys, redundant indexes, table-rewriting column changes, andDROPorRENAMEstatements that break captured queries. - DDL auto-fix (
--writeand editor quick fixes).culprit lint-sql --file <path> --writerewrites fixable DDL statements in place across one or more files or directories. The desktop SQL editor highlights unsafe DDL inline with squiggly underlines, hover cards and one-click Quick fix / Apply all fixes actions. - SARIF 2.1.0 output for CI and GitHub Pull Requests (
--format sarif).culprit lint-sql,culprit scan,culprit findings,culprit analyzeandculprit driftemit SARIF 2.1.0 with stable rule ids and 1-based file/line locations forgithub/codeql-action/upload-sarif. - Virtual index verification (
--with-indexvia PostgreSQLHypoPG).culprit explain --with-index "CREATE INDEX …"(and MCPexplainwithwith_indexes) creates zero-cost hypothetical indexes in a rolled-back transaction whenhypopgis available, plans the query against them, and reports whether the planner uses each proposed index and how much the estimated cost drops. - Application call-site attribution (
file:line). Agent briefs (culprit show, MCPfinding) extract application source file paths and line numbers from SQL comments (Marginalia, SqlCommenter, Rails Query Logs, andpath/to/file.ext:linemarkers) and surface them alongside the SQL fix. - New checks and advisor guidance.
data-corruption: reports page checksum and read failures (pg_stat_database.checksum_failures, SQL Servermsdb.dbo.suspect_pages, MySQL / MariaDB corruption counters).- Partitioning and time-series storage: detects overflowing
DEFAULTpartitions, expiring range partitions with no future child partition, and large append-only timestamp-ordered PostgreSQL tables where aBRINindex (USING brin) fits better than a B-tree. - Foreign keys, primary keys and vacuuming: escalates unindexed PostgreSQL foreign keys when parent tables have non-HOT updates, flags narrow 32-bit integer primary keys on large tables (
narrow-pk), checks per-table disabled autovacuum (autovacuum_enabled = off) and large-table scale factors, checks foreign-key delete rules and collation mismatches, and checks SQLitePRAGMA foreign_keys = OFF. - Write amplification and connection health: reports PostgreSQL
WAL buffers full, MySQLInnodb_buffer_pool_wait_free, and aborted connection handshakes. - Richer schema drift and query-log formats.
culprit driftand timeline history now compare triggers, foreign keys (withON DELETErules), check constraints and redacted partition bounds.culprit-querylogauto-discovers.jsonl/.ndjsonlogs and parses OpenTelemetry JSON spans and structured logger envelopes (pino,bunyan,slog,zap,tracing,logrus).
Fixes
- Broad index seeks and bitmap rechecks.
filtered-scan,non-sargableandleading-wildcardnow evaluate selective residual filters on broadIndex Seekoperators as well as full table scans. PostgreSQLRows Removed by Index Recheckis included inrows_readeven when no separateFilteris present. - Evidence provenance, database identity and cross-surface invariants. Saved reports record typed source outcomes, measurement clocks, database identity (including canonical file path and Unix inode), plan facts, finding facts and refinement decisions. Cross-surface invariant tests verify that Report findings, Dashboard tiles, Index Advisor, Plan Insights, Agent Briefs, Digests, HTML/Markdown exports and SARIF output agree without contradiction or unredacted literals.
Full Changelog: github.com/culpritsql/culprit-sql-studio/compare/v0.3.9...v0.4.0
Downloads & SHA-256 Checksums
culprit-cli-linux-x86_64(26.2 MB)culprit-cli-linux-x86_64.tar.gz(11.5 MB)culprit-cli-macos(41.8 MB)culprit-cli-macos.tar.gz(19.8 MB)culprit-cli-windows-x64.exe(21.7 MB)culprit-cli-windows-x64.zip(9.7 MB)Culprit-SQL-Studio-Linux-amd64.deb(13.1 MB)Culprit-SQL-Studio-Linux-x86_64.AppImage(86.8 MB)GitHub Release ↗