explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RSTZ

Settings
# exclusive inclusive rows x rows loops node
1. 28.072 601.158 ↓ 2.8 39 1

HashAggregate (cost=1,691.80..1,691.94 rows=14 width=4) (actual time=600.902..601.158 rows=39 loops=1)

  • Group Key: pd.production_date
2. 161.053 573.086 ↓ 2.7 3,876 1

Hash Join (cost=75.96..1,688.25 rows=1,419 width=4) (actual time=5.525..573.086 rows=3,876 loops=1)

  • Hash Cond: (rd.ms_recipe_id = r.ms_recipe_id)
3. 263.979 407.915 ↓ 1.4 19,479 1

Nested Loop (cost=30.28..1,575.98 rows=13,972 width=8) (actual time=0.411..407.915 rows=19,479 loops=1)

4. 1.086 1.223 ↓ 1.1 101 1

Bitmap Heap Scan on production_dates pd (cost=29.86..89.97 rows=93 width=8) (actual time=0.365..1.223 rows=101 loops=1)

  • Recheck Cond: (fc_country = 'us'::text)
  • Filter: (production_date >= '2018-12-29'::date)
  • Rows Removed by Filter: 1173
  • Heap Blocks: exact=41
5. 0.137 0.137 ↑ 1.0 1,274 1

Bitmap Index Scan on production_dates_fc_country_index (cost=0.00..29.84 rows=1,274 width=0) (actual time=0.137..0.137 rows=1,274 loops=1)

  • Index Cond: (fc_country = 'us'::text)
6. 142.713 142.713 ↓ 1.3 193 101

Index Scan using recipe_delivery_dates_delivery_date_index on recipe_delivery_dates rd (cost=0.42..14.46 rows=152 width=8) (actual time=0.013..1.413 rows=193 loops=101)

  • Index Cond: (delivery_date = pd.delivery_date)
7. 1.996 4.118 ↑ 1.0 226 1

Hash (cost=42.86..42.86 rows=226 width=4) (actual time=4.118..4.118 rows=226 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
8. 2.080 2.122 ↑ 1.0 226 1

Bitmap Heap Scan on recipes r (cost=6.03..42.86 rows=226 width=4) (actual time=0.064..2.122 rows=226 loops=1)

  • Recheck Cond: (country = 'us'::text)
  • Heap Blocks: exact=27
9. 0.042 0.042 ↑ 1.0 226 1

Bitmap Index Scan on recipes_country_index (cost=0.00..5.98 rows=226 width=0) (actual time=0.042..0.042 rows=226 loops=1)

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