Find the queries that cost you the most.
QueryLens reads PostgreSQL and MySQL slow query logs, groups equivalent queries by fingerprint, ranks them by time and flags common anti-patterns. This page runs the real Python package in your browser (via Pyodide). Your log never leaves your device.
- Two formats. PostgreSQL stderr logs and MySQL slow query logs, auto-detected.
- Fingerprinting. Literals become
?, so reports carry no values. - Exact statistics. Count, total, mean, p50, p95 (nearest-rank), max, share.
- Transparent hints. Eight heuristics on query text, with stated limits.
Playground
Loading the analysis engine…
Sample logs
or
Results
No query pattern matches the current search and filter.
About this demo
- The analysis is performed by the unmodified
slowlensPython package compiled to WebAssembly with Pyodide. The page only adds the interface. The "Text report", "Markdown" and "JSON" tabs show the CLI's own output. - Everything runs locally in a Web Worker. The log is not sent to any server. The page downloads Pyodide (about 10 MB) from the jsDelivr CDN on first load.
- Limits of the demo: 5 MB per log, up to 500 patterns shown, plain-text input only (the CLI also reads
.gzand stdin), and an analysis that runs over 60 seconds is stopped. - Hints are heuristics on query text. They do not see your schema, indexes or query plans, and can be wrong in both directions. PostgreSQL support covers the stderr log format only.
- Normalization is not anonymization: identifiers stay in reports. Review output before sharing it.
Install the CLI
QueryLens is published on PyPI as slowlens.
pipx install slowlens
# or: pip install slowlens
slowlens --version
slowlens postgresql.log --top 5 --sort p95
slowlens mysql-slow.log --output markdown
slowlens app.log --fail-on-hint QL001,QL003 --fail-over-ms 750