explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u3xS

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 5.026 ↑ 1.5 2 1

Limit (cost=208.43..208.44 rows=3 width=280) (actual time=5.024..5.026 rows=2 loops=1)

2. 0.029 5.022 ↑ 5.0 2 1

Sort (cost=208.43..208.46 rows=10 width=280) (actual time=5.022..5.022 rows=2 loops=1)

  • Sort Key: promotions.id
  • Sort Method: quicksort Memory: 26kB
3. 0.015 4.993 ↑ 5.0 2 1

Nested Loop (cost=154.72..208.30 rows=10 width=280) (actual time=4.534..4.993 rows=2 loops=1)

4. 0.562 4.718 ↑ 5.0 2 1

Hash Join (cost=154.44..204.28 rows=10 width=192) (actual time=4.498..4.718 rows=2 loops=1)

  • Hash Cond: (eatery_promotions.promotion_id = promotions.id)
5. 0.532 0.532 ↓ 1.0 2,130 1

Seq Scan on eatery_promotions (cost=0.00..41.90 rows=2,090 width=48) (actual time=0.019..0.532 rows=2,130 loops=1)

6. 0.020 3.624 ↑ 4.0 4 1

Hash (cost=154.24..154.24 rows=16 width=144) (actual time=3.624..3.624 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
7. 3.604 3.604 ↑ 4.0 4 1

Seq Scan on promotions (cost=0.00..154.24 rows=16 width=144) (actual time=1.388..3.604 rows=4 loops=1)

  • Filter: ((deleted_at IS NULL) AND active AND is_group_promotion AND ('2020-05-21 17:35:40.173654+07'::timestamp with time zone >= active_from) AND ('2020-05-21 17:35:40.173654+07'::timestamp with time zone <= active_to) AND (daily_active_from <= 63340) AND (63340 <= daily_active_to))
  • Rows Removed by Filter: 3555
8. 0.260 0.260 ↑ 1.0 1 2

Index Scan using eatery_shipping_fees_eatery_id_unique_idx on eatery_shipping_fees (cost=0.28..0.39 rows=1 width=88) (actual time=0.127..0.130 rows=1 loops=2)

  • Index Cond: (eatery_id = eatery_promotions.eatery_id)
  • Filter: (city_id = 50)
Planning time : 1.315 ms
Execution time : 41.188 ms