SQompLexity

JSON →
library 2.0.0 ·javascript
verified Jun 5, 2026

A metric library for calculating complexity scores of SQL queries, version 2.0.0, tailored for MySQL but compatible with other SQL dialects. It evaluates queries without requiring database schema knowledge, using a weighting system based on data complexity (computational complexity, row estimates, index usage) and control flow complexity (subqueries, joins, aggregations). Released under ISC license, maintained on GitHub with CI, and updated with minor versions. Differentiators: zero schema dependency, browser/Node/CLI support, customizable weight sets.