explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HoZG

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 2.179 ↓ 3.0 6 1

Limit (cost=53.57..75.79 rows=2 width=140) (actual time=2.026..2.179 rows=6 loops=1)

2. 0.061 2.172 ↓ 3.0 6 1

Hash Join (cost=53.57..75.79 rows=2 width=140) (actual time=2.023..2.172 rows=6 loops=1)

  • Hash Cond: (eatery_promotions.promotion_id = promotions.id)
3. 0.209 0.294 ↑ 1.1 34 1

Bitmap Heap Scan on eatery_promotions (cost=4.92..26.97 rows=38 width=4) (actual time=0.125..0.294 rows=34 loops=1)

  • Recheck Cond: (eatery_id = 1346382)
  • Filter: (deleted_at IS NULL)
  • Rows Removed by Filter: 74
  • Heap Blocks: exact=16
4. 0.085 0.085 ↓ 1.3 108 1

Bitmap Index Scan on eatery_promotion_eatery_id_idx (cost=0.00..4.91 rows=84 width=0) (actual time=0.085..0.085 rows=108 loops=1)

  • Index Cond: (eatery_id = 1346382)
5. 0.057 1.817 ↑ 3.9 15 1

Hash (cost=47.92..47.92 rows=59 width=140) (actual time=1.817..1.817 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
6. 1.760 1.760 ↑ 3.9 15 1

Seq Scan on promotions (cost=0.00..47.92 rows=59 width=140) (actual time=1.520..1.760 rows=15 loops=1)

  • Filter: ((deleted_at IS NULL) AND eatery_only AND active AND is_merchant_visible AND (active_from <= '2020-03-20 11:53:04.589363+07'::timestamp with time zone) AND (active_to >= '2020-03-20 11:53:04.589363+07'::timestamp with time zone))
  • Rows Removed by Filter: 1313
Planning time : 0.941 ms
Execution time : 2.425 ms