explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JUKN

Settings
# exclusive inclusive rows x rows loops node
1. 1.266 28.046 ↓ 2.9 60 1

HashAggregate (cost=813.86..814.07 rows=21 width=4) (actual time=28.037..28.046 rows=60 loops=1)

  • Group Key: pd.production_date
2. 5.630 26.780 ↓ 1.8 4,144 1

Hash Join (cost=102.46..808.08 rows=2,311 width=4) (actual time=3.351..26.780 rows=4,144 loops=1)

  • Hash Cond: (rd.ms_recipe_id = r.ms_recipe_id)
3. 5.157 18.023 ↓ 1.5 17,949 1

Nested Loop (cost=0.29..621.20 rows=12,320 width=8) (actual time=0.139..18.023 rows=17,949 loops=1)

4. 2.002 2.002 ↑ 1.0 112 1

Seq Scan on production_dates pd (cost=0.00..164.81 rows=116 width=8) (actual time=0.126..2.002 rows=112 loops=1)

  • Filter: ((production_date >= '2018-12-29'::date) AND (fc_country = 'us'::text))
  • Rows Removed by Filter: 3902
5. 10.864 10.864 ↓ 1.5 160 112

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.009..0.097 rows=160 loops=112)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
7. 2.335 2.335 ↓ 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.041..2.335 rows=2,554 loops=1)

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