explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2tdN

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

Gather Motion 18:1 (slice5; segments: 18) (cost=0.00..6,595.04 rows=4,673,963 width=24) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sequence (cost=0.00..6,319.71 rows=259,665 width=24) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Shared Scan (share slice:id 5:0) (cost=0.00..0.00 rows=1 width=1) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..0.00 rows=1 width=1) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=1 width=8) (actual rows= loops=)

  • One-Time Filter: (gp_execution_segment() = 13)
6. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=1 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=1 width=1) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=0.00..6,313.48 rows=259,665 width=24) (actual rows= loops=)

  • Hash Cond: (logistics_outfit.office_id = logistics_poo.office_id)
9. 0.000 0.000 ↓ 0.0

Sequence (cost=0.00..4,938.70 rows=259,894 width=27) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Partition Selector for logistics_outfit (dynamic scan id: 1) (cost=10.00..100.00 rows=6 width=4) (actual rows= loops=)

  • Partitions selected: 85 (out of 85)
11. 0.000 0.000 ↓ 0.0

Dynamic Seq Scan on logistics_outfit (dynamic scan id: 1) (cost=0.00..4,938.70 rows=259,894 width=27) (actual rows= loops=)

  • Filter: ((sm_id = 6) AND (NOT is_refund) AND (status_id <> ALL ('{1,20,18}'::integer[])))
12. 0.000 0.000 ↓ 0.0

Hash (cost=1,300.93..1,300.93 rows=16,054 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Broadcast Motion 18:18 (slice4; segments: 18) (cost=0.00..1,300.93 rows=16,054 width=4) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.00..1,300.67 rows=892 width=4) (actual rows= loops=)

  • Group Key: logistics_poo.office_id
15. 0.000 0.000 ↓ 0.0

Append (cost=0.00..1,300.56 rows=892 width=4) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.00..438.27 rows=439 width=4) (actual rows= loops=)

  • Group Key: logistics_poo.office_id
17. 0.000 0.000 ↓ 0.0

Redistribute Motion 18:18 (slice2; segments: 18) (cost=0.00..438.21 rows=440 width=4) (actual rows= loops=)

  • Hash Key: logistics_poo.office_id
18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..438.21 rows=440 width=4) (actual rows= loops=)

  • Join Filter: true
19. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.00..431.00 rows=1 width=4) (actual rows= loops=)

  • Group Key: share0_ref2.poo_id
20. 0.000 0.000 ↓ 0.0

Sort (cost=0.00..431.00 rows=1 width=4) (actual rows= loops=)

  • Sort Key: share0_ref2.poo_id
21. 0.000 0.000 ↓ 0.0

Redistribute Motion 18:18 (slice1; segments: 18) (cost=0.00..431.00 rows=1 width=4) (actual rows= loops=)

  • Hash Key: share0_ref2.poo_id
22. 0.000 0.000 ↓ 0.0

Result (cost=0.00..431.00 rows=1 width=4) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Shared Scan (share slice:id 1:0) (cost=0.00..431.00 rows=1 width=4) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Index Scan using stage_erp_logistics_poo_poo_id_idx on logistics_poo (cost=0.00..7.20 rows=440 width=4) (actual rows= loops=)

  • Index Cond: (poo_id = share0_ref2.poo_id)
  • Filter: (NOT (office_id IS NULL))
25. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.00..862.29 rows=454 width=4) (actual rows= loops=)

  • Group Key: logistics_branchoffice.office_id
26. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=0.00..862.23 rows=454 width=4) (actual rows= loops=)

  • Hash Cond: (logistics_branchoffice.region_id = share0_ref3.region_id)
27. 0.000 0.000 ↓ 0.0

Seq Scan on logistics_branchoffice (cost=0.00..431.14 rows=454 width=8) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash (cost=431.00..431.00 rows=1 width=4) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Broadcast Motion 18:18 (slice3; segments: 18) (cost=0.00..431.00 rows=1 width=4) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Result (cost=0.00..431.00 rows=1 width=4) (actual rows= loops=)

  • -> Shared Scan (share slice:id 3:0) (cost=0.00..431.00 rows=1 width=4)Optimizer: Pivotal Optimizer (GPORCA) version 3.86.0