explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4rpS

Settings
# exclusive inclusive rows x rows loops node
1. 0.185 15,974.847 ↑ 1.0 1,000 1

Limit (cost=2,356.73..2,414.23 rows=1,000 width=256) (actual time=15,835.866..15,974.847 rows=1,000 loops=1)

2. 32.300 15,974.662 ↑ 2.0 1,000 1

Unique (cost=2,356.73..2,473.34 rows=2,028 width=256) (actual time=15,835.863..15,974.662 rows=1,000 loops=1)

3. 15,813.462 15,942.362 ↓ 12.3 24,877 1

Sort (cost=2,356.73..2,361.80 rows=2,028 width=256) (actual time=15,835.860..15,942.362 rows=24,877 loops=1)

  • Sort Key: dishes.id, dishes.name, dishes.price, dishes.group_dish_id, dishes.created_by, dishes.created_at, dishes.updated_at, dishes.image, dishes.updated_by, dishes.order_count, dishes.description, dishes.active, dishes.additional_fee, dishes.block_id, dishes.block_phone_number, dishes.deleted_at, dishes.block_country_code, dishes.name_ts, dishes.unit, dishes.unit_quantity, dishes.is_losupply
  • Sort Method: external merge Disk: 18,040kB
4. 21.725 128.900 ↓ 18.8 38,167 1

Nested Loop (cost=157.77..2,245.33 rows=2,028 width=256) (actual time=3.887..128.900 rows=38,167 loops=1)

5. 9.185 19.111 ↓ 15.1 5,504 1

Hash Join (cost=157.35..1,650.88 rows=365 width=4) (actual time=3.858..19.111 rows=5,504 loops=1)

  • Hash Cond: (group_dishes.eatery_id = eatery_shipping_fees.eatery_id)
6. 6.305 6.305 ↓ 1.0 29,962 1

Seq Scan on group_dishes (cost=0.00..1,377.54 rows=29,954 width=8) (actual time=0.070..6.305 rows=29,962 loops=1)

7. 0.072 3.621 ↓ 3.1 165 1

Hash (cost=156.68..156.68 rows=54 width=8) (actual time=3.621..3.621 rows=165 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 7kB
8. 0.137 3.549 ↓ 3.1 165 1

Hash Join (cost=149.79..156.68 rows=54 width=8) (actual time=3.321..3.549 rows=165 loops=1)

  • Hash Cond: (eatery_supply_menus.industry_id = industries.id)
9. 0.122 0.122 ↓ 1.0 327 1

Seq Scan on eatery_supply_menus (cost=0.00..5.16 rows=316 width=4) (actual time=0.012..0.122 rows=327 loops=1)

10. 0.045 3.290 ↓ 1.5 80 1

Hash (cost=149.13..149.13 rows=53 width=12) (actual time=3.290..3.290 rows=80 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 4kB
11. 0.084 3.245 ↓ 1.5 80 1

Hash Join (cost=140.12..149.13 rows=53 width=12) (actual time=3.058..3.245 rows=80 loops=1)

  • Hash Cond: (industries.eatery_id = eatery_shipping_fees.eatery_id)
12. 0.127 0.127 ↓ 1.2 136 1

Seq Scan on industries (cost=0.00..7.60 rows=118 width=8) (actual time=0.009..0.127 rows=136 loops=1)

  • Filter: (active AND is_published)
  • Rows Removed by Filter: 125
13. 0.863 3.034 ↑ 1.0 1,958 1

Hash (cost=115.24..115.24 rows=1,990 width=4) (actual time=3.034..3.034 rows=1,958 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 69kB
14. 2.171 2.171 ↑ 1.0 1,958 1

Seq Scan on eatery_shipping_fees (cost=0.00..115.24 rows=1,990 width=4) (actual time=0.008..2.171 rows=1,958 loops=1)

  • Filter: (active AND is_published)
  • Rows Removed by Filter: 2,466
15. 88.064 88.064 ↑ 1.3 7 5,504

Index Scan using dishes_group_dish_id_idx on dishes (cost=0.42..1.54 rows=9 width=256) (actual time=0.005..0.016 rows=7 loops=5,504)

  • Index Cond: (group_dish_id = group_dishes.id)
Planning time : 2.843 ms
Execution time : 15,980.420 ms