explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QAD0

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 3.966 ↓ 0.0 0 1

Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=0 width=0) (actual time=3.966..3.966 rows=0 loops=1)

  • -> Distributed Subplan 61_1
  • Subplan Duration: 0.00 ms
  • Intermediate Data Size: 7 bytes
  • Result destination: Send to 1 nodes
  • -> Distributed Subplan 61_2
  • Subplan Duration: 0.00 ms
  • Intermediate Data Size: 7 bytes
  • Result destination: Send to 1 nodes
  • -> Distributed Subplan 61_3
  • Subplan Duration: 0.00 ms
  • Intermediate Data Size: 0 bytes
  • Result destination: Send to 1 nodes
  • Task Count: 1
  • Tuple data received from nodes: 0 bytes
  • Tasks Shown: All
  • -> Task
  • Tuple data received from node: 0 bytes
  • Node: host=localhost port=9,701 dbname=postgres
2. 0.010 1.255 ↑ 1.0 1 1

Aggregate (cost=250.00..250.01 rows=1 width=32) (actual time=1.254..1.255 rows=1 loops=1)

3. 1.234 1.245 ↑ 25,000.0 4 1

Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=100,000 width=32) (actual time=1.244..1.245 rows=4 loops=1)

  • Task Count: 4
  • Tuple data received from nodes: 3 bytes
  • Tasks Shown: One of 4
  • -> Task
  • Tuple data received from node: 1 bytes
  • Node: host=localhost port=9,700 dbname=postgres
4. 0.004 0.011 ↑ 1.0 1 1

Aggregate (cost=25.88..25.89 rows=1 width=32) (actual time=0.011..0.011 rows=1 loops=1)

5. 0.007 0.007 ↑ 1,270.0 1 1

Seq Scan on table_1_1480000 table_1 (cost=0.00..22.70 rows=1,270 width=32) (actual time=0.007..0.007 rows=1 loops=1)

6. 0.010 1.009 ↑ 1.0 1 1

Aggregate (cost=250.00..250.01 rows=1 width=32) (actual time=1.008..1.009 rows=1 loops=1)

7. 0.991 0.999 ↑ 25,000.0 4 1

Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=100,000 width=32) (actual time=0.999..0.999 rows=4 loops=1)

  • Task Count: 4
  • Tuple data received from nodes: 3 bytes
  • Tasks Shown: One of 4
  • -> Task
  • Tuple data received from node: 1 bytes
  • Node: host=localhost port=9,700 dbname=postgres
8. 0.003 0.008 ↑ 1.0 1 1

Aggregate (cost=25.88..25.89 rows=1 width=32) (actual time=0.008..0.008 rows=1 loops=1)

9. 0.005 0.005 ↑ 1,270.0 1 1

Seq Scan on table_1_1480000 table_1 (cost=0.00..22.70 rows=1,270 width=32) (actual time=0.004..0.005 rows=1 loops=1)

10. 1.049 1.056 ↓ 0.0 0 1

Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=100,000 width=36) (actual time=1.056..1.056 rows=0 loops=1)

  • Task Count: 4
  • Tuple data received from nodes: 0 bytes
  • Tasks Shown: One of 4
  • -> Task
  • Tuple data received from node: 0 bytes
  • Node: host=localhost port=9,700 dbname=postgres
11. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on table_2_1480004 table_2 (cost=0.00..22.70 rows=1,270 width=36) (actual time=0.007..0.007 rows=0 loops=1)

12. 0.001 1.211 ↓ 0.0 0 1

GroupAggregate (cost=0.02..26.26 rows=2 width=12) (actual time=1.211..1.211 rows=0 loops=1)

  • Group Key: table_2.key
  • Filter: (max(table_2.value) > $0)
13.          

Initplan (for GroupAggregate)

14. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..0.02 rows=5,000 width=32) (never executed)

  • Join Filter: (intermediate_result_1.max = intermediate_result_2.max)
15. 0.000 0.000 ↓ 0.0 0

Function Scan on read_intermediate_result intermediate_result_1 (cost=0.00..0.00 rows=1 width=32) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Function Scan on read_intermediate_result intermediate_result_2 (cost=0.00..0.00 rows=1 width=32) (never executed)

17. 0.000 1.210 ↓ 0.0 0 1

Nested Loop (cost=0.00..25.94 rows=30 width=36) (actual time=1.210..1.210 rows=0 loops=1)

18. 1.210 1.210 ↓ 0.0 0 1

Function Scan on read_intermediate_result intermediate_result (cost=0.00..0.01 rows=1 width=4) (actual time=1.210..1.210 rows=0 loops=1)

  • Filter: (key = 3)
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on table_2_1480005 table_2 (cost=0.00..25.88 rows=6 width=36) (never executed)

  • Filter: (key = 3)
Planning time : 1.921 ms
Execution time : 12.696 ms