Query Insights

functional

Bounded top-query statistics from Query Store, pg_stat_statements, Performance Schema, the ClickHouse query log, or the Redis slow log.

The top 50 queries for the database, sourced from whatever store the engine keeps: SQL Server Query Store, PostgreSQL pg_stat_statements, MySQL / MariaDB Performance Schema, the ClickHouse query log (system.query_log, with recent failures alongside the top queries), or the Redis slow log (SLOWLOG GET). Each row shows the query text with its average duration, execution count, and a reads-shaped column named for what the engine really measures - logical reads on SQL Server, buffer accesses on PostgreSQL, rows examined on MySQL, rows and bytes read on ClickHouse.

  • Rank cycles the ordering: average duration, executions, or reads.
  • Time window - last hour, 24 hours, 7 days, or all time, on SQL Server, whose Query Store keeps time intervals; the other engines are cumulative since their last reset, and the button says so instead of pretending.
  • Open Selected Query puts the row's SQL in an editor tab, it never re-runs anything by itself.
Needs the store enabled. The pane probes the collector when it opens. If it is off, it says so, and where a statement can fix it, offers to script one for review: ALTER DATABASE … SET QUERY_STORE = ON for SQL Server, CREATE EXTENSION pg_stat_statements for PostgreSQL. MySQL's Performance Schema and ClickHouse's query log are server-configuration switches, and the pane is honest about that too.

Engines without a query statistics store say so from the menu: SQLite and libSQL / Turso keep none, DuckDB keeps none either (use Explain Query (Actual) to profile a statement there). Oracle Database reads its shared pool (V$SQLAREA), and a login that cannot see it is told which grant to ask for.

SQLly
SQLly Query Insights top-queries grid
Query Insights: the top queries by average duration, with execution count and logical reads, and Open Selected Query to edit one.