explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oeyX

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

GroupAggregate (cost=627,005,413,949.74..657,202,389,795.73 rows=1,098,071,848,945 width=67) (actual rows= loops=)

  • Group Key: v.name, tmp.vendor_id, tmp.parent_vendor_id
2.          

CTE hierarchy

3. 0.000 0.000 ↓ 0.0

Recursive Union (cost=0.00..332,849,635,056.48 rows=817,278,736 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Seq Scan on ws_9cb0f7f282e1b77088e2bd5f06eef46c6e8a0b7d tmp_1 (cost=0.00..294.76 rows=2,276 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..33,283,328,918.70 rows=81,727,646 width=8) (actual rows= loops=)

  • Join Filter: ((tmp_2.vendor_id = h_1.parent_vendor_id) OR (tmp_2.parent_vendor_id = h_1.vendor_id))
6. 0.000 0.000 ↓ 0.0

WorkTable Scan on hierarchy h_1 (cost=0.00..455.20 rows=22,760 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..10,630,187.56 rows=68,293,704 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on award_fed tmp_2 (cost=0.00..10,021,946.04 rows=68,293,704 width=8) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Sort (cost=294,155,778,893.26..296,900,958,515.62 rows=1,098,071,848,945 width=43) (actual rows= loops=)

  • Sort Key: v.name, tmp.vendor_id, tmp.parent_vendor_id
10. 0.000 0.000 ↓ 0.0

Merge Join (cost=169,674,057.42..16,645,655,450.23 rows=1,098,071,848,945 width=43) (actual rows= loops=)

  • Merge Cond: (tmp.vendor_id = h.vendor_id)
11. 0.000 0.000 ↓ 0.0

Merge Join (cost=19,575,693.72..22,265,421.26 rows=68,293,704 width=51) (actual rows= loops=)

  • Merge Cond: (v.eid = tmp.vendor_id)
12. 0.000 0.000 ↓ 0.0

Index Scan using vendors_location_pk on vendors_location v (cost=0.44..1,515,230.06 rows=17,612,708 width=35) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Materialize (cost=19,575,681.38..19,917,149.90 rows=68,293,704 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Sort (cost=19,575,681.38..19,746,415.64 rows=68,293,704 width=16) (actual rows= loops=)

  • Sort Key: tmp.vendor_id
15. 0.000 0.000 ↓ 0.0

Seq Scan on award_fed tmp (cost=0.00..10,021,946.04 rows=68,293,704 width=16) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Materialize (cost=150,098,363.70..154,184,757.38 rows=817,278,736 width=4) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Sort (cost=150,098,363.70..152,141,560.54 rows=817,278,736 width=4) (actual rows= loops=)

  • Sort Key: h.vendor_id
18. 0.000 0.000 ↓ 0.0

CTE Scan on hierarchy h (cost=0.00..16,345,574.72 rows=817,278,736 width=4) (actual rows= loops=)