explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4t6u

Settings
# exclusive inclusive rows x rows loops node
1. 27.756 595.081 ↓ 3.9 39 1

HashAggregate (cost=1,309.77..1,309.87 rows=10 width=4) (actual time=594.808..595.081 rows=39 loops=1)

  • Group Key: pd.production_date
2. 161.252 567.325 ↓ 3.7 3,876 1

Hash Join (cost=75.95..1,307.17 rows=1,038 width=4) (actual time=5.431..567.325 rows=3,876 loops=1)

  • Hash Cond: (rd.ms_recipe_id = r.ms_recipe_id)
3. 261.378 402.018 ↓ 1.9 19,449 1

Nested Loop (cost=30.27..1,212.80 rows=10,216 width=8) (actual time=0.376..402.018 rows=19,449 loops=1)

4. 0.861 0.991 ↓ 1.1 73 1

Bitmap Heap Scan on production_dates pd (cost=29.85..93.15 rows=68 width=8) (actual time=0.331..0.991 rows=73 loops=1)

  • Recheck Cond: (fc_country = 'us'::text)
  • Filter: ((production_date >= '2018-12-29'::date) AND (production_date <= '2019-02-05'::date))
  • Rows Removed by Filter: 1201
  • Heap Blocks: exact=41
5. 0.130 0.130 ↑ 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.130..0.130 rows=1,274 loops=1)

  • Index Cond: (fc_country = 'us'::text)
6. 139.649 139.649 ↓ 1.8 266 73

Index Scan using recipe_delivery_dates_delivery_date_index on recipe_delivery_dates rd (cost=0.42..14.95 rows=152 width=8) (actual time=0.014..1.913 rows=266 loops=73)

  • Index Cond: (delivery_date = pd.delivery_date)
7. 2.050 4.055 ↑ 1.0 226 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
8. 1.966 2.005 ↑ 1.0 226 1

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

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

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

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