explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Y6Fc

Settings
# exclusive inclusive rows x rows loops node
1. 4.765 43.818 ↑ 1.0 1 1

Aggregate (cost=26,068.43..26,068.44 rows=1 width=360) (actual time=43.813..43.818 rows=1 loops=1)

2. 0.420 39.053 ↑ 4.3 2,510 1

Nested Loop Left Join (cost=54.22..25,232.49 rows=10,786 width=27) (actual time=1.569..39.053 rows=2,510 loops=1)

3. 1.094 28.593 ↑ 4.3 2,510 1

Hash Left Join (cost=53.67..18,973.40 rows=10,786 width=87) (actual time=1.548..28.593 rows=2,510 loops=1)

  • Hash Cond: (dais.amazon_product_sha = acwos.amazon_product_sha)
4. 0.728 26.074 ↑ 4.3 2,510 1

Nested Loop Left Join (cost=5.92..18,881.35 rows=10,786 width=120) (actual time=0.106..26.074 rows=2,510 loops=1)

  • Join Filter: (daias.amazon_product_sha = dais.amazon_product_sha)
5. 0.000 25.346 ↑ 4.3 2,510 1

Nested Loop (cost=3.45..18,715.04 rows=10,786 width=120) (actual time=0.072..25.346 rows=2,510 loops=1)

6. 0.402 3.657 ↑ 3.0 3,615 1

Nested Loop (cost=2.88..1,278.17 rows=10,786 width=54) (actual time=0.057..3.657 rows=3,615 loops=1)

7. 0.005 0.036 ↑ 1.0 1 1

HashAggregate (cost=2.33..2.34 rows=1 width=33) (actual time=0.034..0.036 rows=1 loops=1)

  • Group Key: amazon_sellers.seller_marketplace_sha
8. 0.001 0.031 ↑ 1.0 1 1

Limit (cost=0.29..2.31 rows=1 width=33) (actual time=0.030..0.031 rows=1 loops=1)

9. 0.030 0.030 ↑ 1.0 1 1

Index Scan using amazon_sellers_seller_id_marketplace_id_key on amazon_sellers (cost=0.29..2.31 rows=1 width=33) (actual time=0.030..0.030 rows=1 loops=1)

  • Index Cond: (((seller_id)::text = 'A1LMQBEOGTEVAC'::text) AND ((marketplace_id)::text = 'ATVPDKIKX0DER'::text))
  • Filter: (((seller_id)::text ~~ 'A1LMQBEOGTEVAC'::text) AND ((marketplace_id)::text ~~ 'ATVPDKIKX0DER'::text))
10. 3.219 3.219 ↓ 2.9 3,615 1

Index Scan using daily_amazon_inventory_snapshots_p2020_10_05_pkey on daily_amazon_inventory_snapshots_p2020_10_05 dais (cost=0.56..1,263.43 rows=1,240 width=87) (actual time=0.020..3.219 rows=3,615 loops=1)

  • Index Cond: ((amazon_seller_sha = amazon_sellers.seller_marketplace_sha) AND (date = '2020-10-05'::date))
11. 21.690 21.690 ↑ 1.0 1 3,615

Index Scan using amazon_products_pkey on amazon_products ap (cost=0.56..1.62 rows=1 width=66) (actual time=0.006..0.006 rows=1 loops=3,615)

  • Index Cond: (seller_marketplace_sku_sha = dais.amazon_product_sha)
12. 0.000 0.000 ↓ 0.0 0 2,510

Materialize (cost=2.47..4.53 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=2,510)

13. 0.002 0.028 ↓ 0.0 0 1

Nested Loop (cost=2.47..4.52 rows=1 width=32) (actual time=0.027..0.028 rows=0 loops=1)

14. 0.001 0.017 ↑ 1.0 1 1

HashAggregate (cost=2.33..2.34 rows=1 width=33) (actual time=0.017..0.017 rows=1 loops=1)

  • Group Key: amazon_sellers_1.seller_marketplace_sha
15. 0.001 0.016 ↑ 1.0 1 1

Limit (cost=0.29..2.31 rows=1 width=33) (actual time=0.016..0.016 rows=1 loops=1)

16. 0.015 0.015 ↑ 1.0 1 1

Index Scan using amazon_sellers_seller_id_marketplace_id_key on amazon_sellers amazon_sellers_1 (cost=0.29..2.31 rows=1 width=33) (actual time=0.015..0.015 rows=1 loops=1)

  • Index Cond: (((seller_id)::text = 'A24BVQ69RJOKWH'::text) AND ((marketplace_id)::text = 'ATVPDKIKX0DER'::text))
  • Filter: (((seller_id)::text ~~ 'A24BVQ69RJOKWH'::text) AND ((marketplace_id)::text ~~ 'ATVPDKIKX0DER'::text))
17. 0.009 0.009 ↓ 0.0 0 1

Index Only Scan using daily_amazon_inventory_age_snapshots_p2020_10_05_pkey on daily_amazon_inventory_age_snapshots_p2020_10_05 daias (cost=0.15..2.18 rows=1 width=64) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: ((amazon_seller_sha = amazon_sellers_1.seller_marketplace_sha) AND (date = '2020-10-05'::date))
  • Heap Fetches: 0
18. 0.454 1.425 ↓ 10.0 1,991 1

Hash (cost=45.24..45.24 rows=200 width=33) (actual time=1.424..1.425 rows=1,991 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 143kB
19. 0.145 0.971 ↓ 10.0 1,991 1

Nested Loop (cost=2.73..45.24 rows=200 width=33) (actual time=0.024..0.971 rows=1,991 loops=1)

20. 0.002 0.012 ↑ 1.0 1 1

HashAggregate (cost=2.33..2.34 rows=1 width=33) (actual time=0.011..0.012 rows=1 loops=1)

  • Group Key: amazon_sellers_2.seller_marketplace_sha
21. 0.000 0.010 ↑ 1.0 1 1

Limit (cost=0.29..2.31 rows=1 width=33) (actual time=0.010..0.010 rows=1 loops=1)

22. 0.010 0.010 ↑ 1.0 1 1

Index Scan using amazon_sellers_seller_id_marketplace_id_key on amazon_sellers amazon_sellers_2 (cost=0.29..2.31 rows=1 width=33) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (((seller_id)::text = 'A1LMQBEOGTEVAC'::text) AND ((marketplace_id)::text = 'ATVPDKIKX0DER'::text))
  • Filter: (((seller_id)::text ~~ 'A1LMQBEOGTEVAC'::text) AND ((marketplace_id)::text ~~ 'ATVPDKIKX0DER'::text))
23. 0.814 0.814 ↓ 10.0 1,991 1

Index Only Scan using amazon_current_weeks_of_supply_pkey on amazon_current_weeks_of_supply acwos (cost=0.41..40.91 rows=200 width=66) (actual time=0.012..0.814 rows=1,991 loops=1)

  • Index Cond: (amazon_seller_sha = amazon_sellers_2.seller_marketplace_sha)
  • Heap Fetches: 0
24. 10.040 10.040 ↑ 1.0 1 2,510

Index Scan using amazon_current_cogs_pkey on amazon_current_cogs acc (cost=0.56..0.58 rows=1 width=72) (actual time=0.004..0.004 rows=1 loops=2,510)

  • Index Cond: ((amazon_seller_sha = ap.amazon_seller_sha) AND (amazon_product_sha = ap.seller_marketplace_sku_sha))
Planning time : 2.048 ms
Execution time : 44.034 ms