Skip to content

Cyberpunk SQL analyzer with 50+ query detectors. Catches performance killers, security risks & bad patterns before production. Features stunning vaporwave CLI output, real-time analysis, and actionable fixes. Stop shipping slow queries.

License

Notifications You must be signed in to change notification settings

makroumi/slowql

πŸ”₯ SlowQL

Catch Expensive SQL Before Production

Static SQL analyzer with a cyberpunk aesthetic.
Detects 50+ performance killers, security risks, and anti‑patterns before they cost you money.


πŸš€ Vision

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.

πŸ”— Badges

πŸ“¦ Package & Release

Release PyPI Docker GHCR

πŸ“Š Downloads

Docker Pulls PyPI Downloads GitHub stars

πŸ§ͺ Tests & Quality

CI Coverage Ruff Mypy Tests

πŸ”’ Security & Dependencies

Dependabot Security

πŸ“£ Community

Discussions Contributors Sponsor


SlowQL Demo


⚑ Quick Start

pip install slowql
slowql --input-file your_queries.sql

Or analyze queries interactively:

slowql --mode paste

🎯 What It Catches

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.


πŸ“Š Example

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

πŸš€ Features

  • Cyberpunk CLI β€” cinematic terminal output with optional Matrix intro
  • Multiple formats β€” export to HTML, JSON, or CSV
  • CI/CD ready β€” --fast --non-interactive for pipelines
  • Database‑free β€” analyzes SQL strings statically

πŸ“– Usage

Analyze a file

slowql --input-file queries.sql --export html

Interactive mode

slowql
# Paste your SQL, press Ctrl+D when done

CI/CD integration

slowql --input-file schema.sql --export json --fast --non-interactive

Python API

from slowql.core.analyzer import QueryAnalyzer

analyzer = QueryAnalyzer()
results = analyzer.analyze("SELECT * FROM users WHERE id = 1")
print(results)

πŸ› οΈ Installation

Recommended (isolated):

pipx install slowql

Standard:

pip install slowql

From source:

git clone https://github.com/makroumi/slowql
cd slowql
pip install -e .

πŸ§ͺ Development

pip install -e '.[dev]'
pytest
pytest --cov=slowql

πŸ“ License

Apache 2.0 β€” see LICENSE


🀝 Contributing

Issues and PRs welcome! Please run tests before submitting.
For major changes, open a discussion first.


Built by @makroumi
πŸ“’ Report Issues

About

Cyberpunk SQL analyzer with 50+ query detectors. Catches performance killers, security risks & bad patterns before production. Features stunning vaporwave CLI output, real-time analysis, and actionable fixes. Stop shipping slow queries.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages