explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 83o8

Settings
# exclusive inclusive rows x rows loops node
1. 50.252 19,232.083 ↑ 1.4 1,480 1

Unique (cost=2,356.73..2,473.34 rows=2,028 width=256) (actual time=18,960.785..19,232.083 rows=1,480 loops=1)

2. 18,898.197 19,181.831 ↓ 18.8 38,167 1

Sort (cost=2,356.73..2,361.80 rows=2,028 width=256) (actual time=18,960.782..19,181.831 rows=38,167 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
3. 32.776 283.634 ↓ 18.8 38,167 1

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

4. 11.937 25.194 ↓ 15.1 5,504 1

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

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

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

6. 0.087 3.755 ↓ 3.1 165 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 7kB
7. 0.156 3.668 ↓ 3.1 165 1

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

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

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

9. 0.039 3.363 ↓ 1.5 80 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 4kB
10. 0.071 3.324 ↓ 1.5 80 1

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

  • Hash Cond: (industries.eatery_id = eatery_shipping_fees.eatery_id)
11. 0.109 0.109 ↓ 1.2 136 1

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

  • Filter: (active AND is_published)
  • Rows Removed by Filter: 125
12. 0.838 3.144 ↑ 1.0 1,958 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 69kB
13. 2.306 2.306 ↑ 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.306 rows=1,958 loops=1)

  • Filter: (active AND is_published)
  • Rows Removed by Filter: 2,466
14. 225.664 225.664 ↑ 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.013..0.041 rows=7 loops=5,504)

  • Index Cond: (group_dish_id = group_dishes.id)
Planning time : 2.929 ms
Execution time : 19,238.624 ms