Static SQL analyzer with a cyberpunk aesthetic.
Detects 50+ performance killers, security risks, and antiβpatterns before they cost you money.
SlowQL isnβt just another linter. Itβs a billionβdollar safeguard for dataβdriven companies:
- Prevent catastrophic table wipes before they hit prod.
- Slash cloud bills by eliminating fullβtable scans.
- Harden pipelines against SQL injection and antiβpatterns.
- Deliver instant credibility in CI/CD with cinematic, cyberpunkβstyled reports.
pip install slowql
slowql --input-file your_queries.sqlOr analyze queries interactively:
slowql --mode paste| Severity | Issue | Impact |
|---|---|---|
| π¨ CRITICAL | DELETE/UPDATE without WHERE | Prevents accidental table wipes |
| π₯ HIGH | NonβSARGable queries | Forces full table scans instead of index seeks |
| π₯ HIGH | Leading wildcards (LIKE '%x') | Prevents index usage |
| π« MEDIUM | SELECT * usage | Unnecessary data transfer, prevents covering indexes |
| π LOW | Unnecessary DISTINCT | Adds sorting overhead |
50+ detectors total covering performance, security, and maintainability.
slowql --input-file examples/nasty_queries.sqlβββββββββββββββββββββββββββββββββββββββββββββββββ
β SQL Analysis Results β
βββββββββββββββββββββββββββββββββββββββββββββββββ
Found 46 optimization opportunities
Across 21 different issue types
π¨ CRITICAL: 2
π₯ HIGH : 8
π« MEDIUM : 7
π LOW : 4
π΄ CRITICAL: Missing WHERE in UPDATE/DELETE
Query: DELETE FROM users
Fix: Add WHERE clause or use TRUNCATE if intentional
Impact: Can delete/update entire table accidentally
- Cyberpunk CLI β cinematic terminal output with optional Matrix intro
- Multiple formats β export to HTML, JSON, or CSV
- CI/CD ready β
--fast --non-interactivefor pipelines - Databaseβfree β analyzes SQL strings statically
slowql --input-file queries.sql --export htmlslowql
# Paste your SQL, press Ctrl+D when doneslowql --input-file schema.sql --export json --fast --non-interactivefrom slowql.core.analyzer import QueryAnalyzer
analyzer = QueryAnalyzer()
results = analyzer.analyze("SELECT * FROM users WHERE id = 1")
print(results)Recommended (isolated):
pipx install slowqlStandard:
pip install slowqlFrom source:
git clone https://github.com/makroumi/slowql
cd slowql
pip install -e .pip install -e '.[dev]'
pytest
pytest --cov=slowqlApache 2.0 β see LICENSE
Issues and PRs welcome! Please run tests before submitting.
For major changes, open a discussion first.
Built by @makroumi
π’ Report Issues
