How is the "stall time" calculated?

When I use explain analyze select x,y from a,b where z1=z2 group by x, we can see the physical plan:

I wonder what does “stall time” exactly mean? how is the “stall time” calculated?

I have found the explanation in the document but I still feel confuse.

Many thanks for your answer.

Stall time is calculated by adding up the time that a processor spends waiting on input after it has asked for the next row from its upstream processor. For example, in the HashJoiner/19 case the HashJoiner spent 5.5s waiting on its left input in total since the HashJoiner started execution. This includes most of the time spent reading rows, execution, and sending them across the network before the HashJoiner gets a row back. However, note that stall time does not necessarily include all of this time as processors on different nodes may have been started at different times and rows are pushed, not pulled over the network.

I hope this answers your question, let me know if you would like me to clarify anything further.

1 Like

Thank you very much for your explanation.This information is very useful to me because I am troubleshooting a query that takes a long time to execute. Currently I can initially determine which step the time is spent on.:kissing_heart: