explain.depesz.com

PostgreSQL's explain analyze made readable

Result: frNK

Settings
# exclusive inclusive rows x rows loops node
1. 0.882 20.749 ↓ 2.9 61 1

HashAggregate (cost=823.02..823.23 rows=21 width=4) (actual time=20.735..20.749 rows=61 loops=1)

  • Group Key: pd.production_date
2. 4.288 19.867 ↓ 1.8 4,224 1

Hash Join (cost=102.77..817.15 rows=2,346 width=4) (actual time=2.377..19.867 rows=4,224 loops=1)

  • Hash Cond: (rd.ms_recipe_id = r.ms_recipe_id)
3. 4.278 13.418 ↓ 1.5 18,469 1

Nested Loop (cost=0.29..628.55 rows=12,532 width=8) (actual time=0.157..13.418 rows=18,469 loops=1)

4. 1.730 1.730 ↑ 1.0 114 1

Seq Scan on production_dates pd (cost=0.00..164.86 rows=118 width=8) (actual time=0.142..1.730 rows=114 loops=1)

  • Filter: ((production_date >= '2018-12-29'::date) AND (fc_country = 'us'::text))
  • Rows Removed by Filter: 3903
5. 7.410 7.410 ↓ 1.5 162 114

Index Scan using recipe_delivery_dates_delivery_date_index on recipe_delivery_dates rd (cost=0.29..2.86 rows=107 width=8) (actual time=0.005..0.065 rows=162 loops=114)

  • Index Cond: (delivery_date = pd.delivery_date)
6. 0.485 2.161 ↑ 1.0 2,554 1

Hash (cost=70.56..70.56 rows=2,554 width=4) (actual time=2.161..2.161 rows=2,554 loops=1)

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

Index Scan using recipes_country_index on recipes r (cost=0.29..70.56 rows=2,554 width=4) (actual time=0.033..1.676 rows=2,554 loops=1)

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