Is there any way to show a live query plan during the execution of a query?

Is there any way to show a live query plan during the execution of a query?

1 Like

Not at this time. The EXPLAIN command provides the estimated query plan without executing the query, so you get the plan and the operators, but not the execution metrics. The PROFILE command executes the query, collects metrics at each stage of the query execution plan and displays those results as a tree. VISUAL PROFILE is the graphical representation and provides convenient exploration capabilities like the stack-ranking of operators by execution time. But, at this time, these execution stats are only provided after the query execution completes. Live query stats would only be interesting for queries running many minutes, but probably with additional processing overhead. How many long-running queries do you have?

Thank You for the reply. It is not just for long-running queries but for query development as well. We want to see how it acts before deployment but live.

@alau How long do your queries run?

ms to seconds. My issue is not how long the queries run. I want to know information such as memory usage, network usage etc… Same information you would see in a profile but “live” when the query is active.

Got it. I will pass this request on to the dev team and we’ll consider it for the future.

Also, seeing queries that run for ms while they are active doesn’t seem very practical or realistic since they are almost instantaneous. This is true even for queries up to a few seconds, I think. For queries more than a few seconds, live monitoring makes a lot of sense.

Is there something more you want? Is there a particular problem you’re having, and if so, what?