compare_sql_executions
Compare aggregated performance metrics (stages, tasks, shuffle, spill, GC) between two SQL executions; opt-in plan-structure diff
How to use it
compare_sql_executions is exposed by the MCP Apache Spark History Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the compare_sql_executions tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install MCP Apache Spark History Server
uvx --from mcp-apache-spark-history-server spark-mcpOther tools in MCP Apache Spark History Server (18)
One-shot root cause analysis of failed/slow Spark workloads
Code fix recommendations for identified Spark issues
Diff Spark configs between two applications
Diff performance metrics between two applications
Compare two stages (optionally across applications): stage metrics and per-task p25/p50/p75/max quantiles
Spark config, JVM info, system properties, classpath; optional section filter to return a single part
Aggregate metrics across all executors
JVM thread dump for a driver/executor, with state/name/blocked filters (running apps only)
Identify bottlenecks across stages, tasks, and executors
Chronological executor add/remove with resource totals
SQL execution header by default; opt-in plan, node metrics, job summaries, aggregated stage metrics, and stage list
Stage detail with attempt and task metric distributions
List applications with optional status, date, and limit filters; pass appid for a single application's detail (status, resources, duration, attempts). Returned applications always include their attempts.
List executors with executor-id filtering and sorting (failed-tasks/duration/gc/id)
List jobs with status/job-id filtering and sorting (e.g. slowest by duration)
List SQL executions as curated summaries, with status/description filters, sorting, and a default limit
Failed tasks of a stage with their error messages (exception/stack trace)
List stages with status filtering and sorting (e.g. slowest by duration)