Health and performance · stop 7 of 13

slow_queries

Lists the slowest queries the database has seen.

Works in read modeTool sets: dba · full

You might ask

“What are our slowest queries?”

Your assistant may call slow_queries to answer.

How it works

  • Reads pg_stat_statements, ordered by mean execution time.
  • That extension has to be installed; if it isn't, you get a hint on how to enable it instead of an error.

Parameters

limitnumber
Maximum number of statements to return. Default 10.

What your assistant reads

The description nexql-mcp sends with the tool. It's how the assistant decides when to use it.

List the slowest statements by mean execution time from pg_stat_statements (requires the extension; returns a hint if not installed).