explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a8Cn

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 1.665 ↓ 3.0 6 1

Limit (cost=75.80..75.80 rows=2 width=140) (actual time=1.661..1.665 rows=6 loops=1)

2. 0.029 1.659 ↓ 3.0 6 1

Sort (cost=75.80..75.80 rows=2 width=140) (actual time=1.658..1.659 rows=6 loops=1)

  • Sort Key: promotions.is_group_promotion
  • Sort Method: quicksort Memory: 26kB
3. 0.043 1.630 ↓ 3.0 6 1

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

  • Hash Cond: (eatery_promotions.promotion_id = promotions.id)
4. 0.168 0.241 ↑ 1.1 34 1

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

  • Recheck Cond: (eatery_id = 1346382)
  • Filter: (deleted_at IS NULL)
  • Rows Removed by Filter: 74
  • Heap Blocks: exact=16
5. 0.073 0.073 ↓ 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.073..0.073 rows=108 loops=1)

  • Index Cond: (eatery_id = 1346382)
6. 0.059 1.346 ↑ 3.9 15 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
7. 1.287 1.287 ↑ 3.9 15 1

Seq Scan on promotions (cost=0.00..47.92 rows=59 width=140) (actual time=1.122..1.287 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.836 ms
Execution time : 1.844 ms