explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xxqX8

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

Nested Loop Left Join (cost=18,902,313.72..18,902,387.72 rows=1 width=49) (actual rows= loops=)

  • Join Filter: ((expected_shipments_ge20200809_lt20210207.str_id)::text = (valid_stores_ge20200809_lt20210808.str_id)::text)
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18,186,762.45..18,186,823.67 rows=1 width=41) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=18,186,762.03..18,186,815.22 rows=1 width=37) (actual rows= loops=)

  • Merge Cond: ((valid_stores_ge20200809_lt20210808.str_id)::text = (on_hand_inventory_ge20201004_lt20201129.str_id)::text)
4. 0.000 0.000 ↓ 0.0

Sort (cost=194.93..194.93 rows=1 width=29) (actual rows= loops=)

  • Sort Key: valid_stores_ge20200809_lt20210808.str_id
5. 0.000 0.000 ↓ 0.0

Append (cost=0.00..194.92 rows=1 width=29) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Seq Scan on valid_stores_ge20200809_lt20210808 (cost=0.00..194.91 rows=1 width=29) (actual rows= loops=)

  • Filter: (upload_date = '2020-10-15 00:00:00'::timestamp without time zone)
7. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=18,186,567.10..18,186,617.77 rows=200 width=13) (actual rows= loops=)

  • Group Key: on_hand_inventory_ge20201004_lt20201129.str_id
8. 0.000 0.000 ↓ 0.0

Gather Merge (cost=18,186,567.10..18,186,613.77 rows=400 width=13) (actual rows= loops=)

  • Workers Planned: 2
9. 0.000 0.000 ↓ 0.0

Sort (cost=18,185,567.08..18,185,567.58 rows=200 width=13) (actual rows= loops=)

  • Sort Key: on_hand_inventory_ge20201004_lt20201129.str_id
10. 0.000 0.000 ↓ 0.0

Partial HashAggregate (cost=18,185,557.43..18,185,559.43 rows=200 width=13) (actual rows= loops=)

  • Group Key: on_hand_inventory_ge20201004_lt20201129.str_id
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..2,885,431.19 rows=3,060,025,248 width=9) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Parallel Append (cost=0.57..674,168.44 rows=333,085 width=15) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Parallel Index Scan using products_ge20201004_lt20201018_upload_date_idx on products_ge20201004_lt20201018 (cost=0.57..672,503.02 rows=333,085 width=15) (actual rows= loops=)

  • Index Cond: (upload_date = '2020-10-15 00:00:00'::timestamp without time zone)
  • Filter: (((division)::text = 'Footwear'::text) AND ((genderage)::text = 'Womens'::text))
14. 0.000 0.000 ↓ 0.0

Append (cost=0.56..6.24 rows=40 width=24) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Scan using on_hand_inventory_ge20201004_lt2020_gtin_str_id_upload_date_key on on_hand_inventory_ge20201004_lt20201129 (cost=0.56..6.04 rows=40 width=24) (actual rows= loops=)

  • Index Cond: (((gtin)::text = (products_ge20201004_lt20201018.gtin)::text) AND (upload_date = '2020-10-15 00:00:00'::timestamp without time zone))
16. 0.000 0.000 ↓ 0.0

Append (cost=0.42..8.45 rows=1 width=9) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using store_capacity_ge20200809_lt2_str_id_genderage_division_upl_key on store_capacity_ge20200809_lt20210207 (cost=0.42..8.44 rows=1 width=9) (actual rows= loops=)

  • Index Cond: (((valid_stores_ge20200809_lt20210808.str_id)::text = (str_id)::text) AND ((genderage)::text = 'Womens'::text) AND ((division)::text = 'Footwear'::text) AND (upload_date = '2020-10-15 00:00:00'::timestamp without time zone))
18. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=715,551.28..715,564.03 rows=1 width=12) (actual rows= loops=)

  • Group Key: expected_shipments_ge20200809_lt20210207.str_id
19. 0.000 0.000 ↓ 0.0

Gather Merge (cost=715,551.28..715,564.01 rows=2 width=12) (actual rows= loops=)

  • Workers Planned: 2
20. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=714,551.25..714,563.75 rows=1 width=12) (actual rows= loops=)

  • Group Key: expected_shipments_ge20200809_lt20210207.str_id
21. 0.000 0.000 ↓ 0.0

Sort (cost=714,551.25..714,555.42 rows=1,665 width=8) (actual rows= loops=)

  • Sort Key: expected_shipments_ge20200809_lt20210207.str_id
22. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..714,462.16 rows=1,665 width=8) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Parallel Append (cost=0.00..714,453.56 rows=1 width=23) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on expected_shipments_ge20200809_lt20210207 (cost=0.00..714,453.55 rows=1 width=23) (actual rows= loops=)

  • Filter: (upload_date = '2020-10-15 00:00:00'::timestamp without time zone)
25. 0.000 0.000 ↓ 0.0

Append (cost=0.57..8.60 rows=1 width=15) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Index Scan using products_ge20201004_lt20201018_gtin_upload_date_key on products_ge20201004_lt20201018 products_ge20201004_lt20201018_1 (cost=0.57..8.59 rows=1 width=15) (actual rows= loops=)

  • Index Cond: (((gtin)::text = (expected_shipments_ge20200809_lt20210207.gtin)::text) AND (upload_date = '2020-10-15 00:00:00'::timestamp without time zone))
  • Filter: (((division)::text = 'Footwear'::text) AND ((genderage)::text = 'Womens'::text))