explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yPI6

Settings
# exclusive inclusive rows x rows loops node
1. 1.143 30.457 ↓ 3.0 39 1

HashAggregate (cost=641.17..641.30 rows=13 width=4) (actual time=30.448..30.457 rows=39 loops=1)

  • Group Key: pd.production_date
2. 5.126 29.314 ↓ 1.8 2,694 1

Hash Join (cost=102.46..637.44 rows=1,494 width=4) (actual time=5.211..29.314 rows=2,694 loops=1)

  • Hash Cond: (rd.ms_recipe_id = r.ms_recipe_id)
3. 4.689 19.255 ↓ 1.5 11,700 1

Nested Loop (cost=0.29..480.49 rows=7,966 width=8) (actual time=0.179..19.255 rows=11,700 loops=1)

4. 3.105 3.105 ↑ 1.0 73 1

Seq Scan on production_dates pd (cost=0.00..174.85 rows=75 width=8) (actual time=0.161..3.105 rows=73 loops=1)

  • Filter: ((production_date >= '2018-12-29'::date) AND (production_date <= '2019-02-05'::date) AND (fc_country = 'us'::text))
  • Rows Removed by Filter: 3941
5. 11.461 11.461 ↓ 1.5 160 73

Index Scan using recipe_delivery_dates_delivery_date_index on recipe_delivery_dates rd (cost=0.29..3.01 rows=107 width=8) (actual time=0.013..0.157 rows=160 loops=73)

  • Index Cond: (delivery_date = pd.delivery_date)
6. 1.282 4.933 ↓ 1.0 2,554 1

Hash (cost=70.39..70.39 rows=2,542 width=4) (actual time=4.933..4.933 rows=2,554 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
7. 3.651 3.651 ↓ 1.0 2,554 1

Index Scan using recipes_country_index on recipes r (cost=0.29..70.39 rows=2,542 width=4) (actual time=0.034..3.651 rows=2,554 loops=1)

  • Index Cond: (country = 'us'::text)