explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aAtt

Settings
# exclusive inclusive rows x rows loops node
1. 1.903 45.824 ↓ 2.9 60 1

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

  • Group Key: pd.production_date
2. 8.537 43.921 ↓ 1.8 4,144 1

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

  • Hash Cond: (rd.ms_recipe_id = r.ms_recipe_id)
3. 7.454 32.449 ↓ 1.5 17,925 1

Nested Loop (cost=0.29..621.20 rows=12,320 width=8) (actual time=0.136..32.449 rows=17,925 loops=1)

4. 2.595 2.595 ↑ 1.0 112 1

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

  • Filter: ((production_date >= '2018-12-29'::date) AND (fc_country = 'us'::text))
  • Rows Removed by Filter: 3902
5. 22.400 22.400 ↓ 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.043..0.200 rows=160 loops=112)

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

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

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

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