Skip to content
Advertisement

In pgadmin EXPLAIN ANALYSE , exclusive vs inclusive

As showed below, I tried to optimise my query based on EXPLAIN ANALYSE function of Pgadmin. Can someone experienced with it tell me the difference between INCLUSIVE and EXCLUSIVE in Timings? And why can EXCLUSIVE be negative ?Thanks

enter image description here

Advertisement

Answer

This looks like similar to https://explain.depesz.com/help which says:

Exclusive:

This is the total amount of time PostgreSQL spent evaluating this node, without time spent in its subnodes. If the node has been
executed many times (for example because of a Nested Loop plan), this
time will be correctly multiplied.

Inclusive:

This is just like Exclusive, but it doesn’t exclude time of subnodes.
So, by definition the top node will have Inclusive time equal to the
total time of the query.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement