explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tsoe

Settings
# exclusive inclusive rows x rows loops node
1. 0.102 15,245.521 ↑ 1.0 1,000 1

Limit (cost=49,549.42..49,604.42 rows=1,000 width=883) (actual time=15,187.290..15,245.521 rows=1,000 loops=1)

2. 29.776 15,245.419 ↑ 27.1 1,000 1

Unique (cost=49,549.42..51,040.25 rows=27,106 width=883) (actual time=15,187.288..15,245.419 rows=1,000 loops=1)

3. 15,067.048 15,215.643 ↑ 1.0 26,333 1

Sort (cost=49,549.42..49,617.18 rows=27,106 width=883) (actual time=15,187.279..15,215.643 rows=26,333 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
  • Sort Method: external merge Disk: 20,648kB
4. 39.120 148.595 ↓ 1.6 43,949 1

Merge Join (cost=9,285.22..41,366.66 rows=27,106 width=883) (actual time=19.725..148.595 rows=43,949 loops=1)

  • Merge Cond: (eatery_supply_menus.industry_id = industries.id)
5. 1.331 1.331 ↑ 1.0 209 1

Index Only Scan using eatery_supply_menus_industry_id_idx on eatery_supply_menus (cost=0.14..5.48 rows=209 width=4) (actual time=0.023..1.331 rows=209 loops=1)

  • Heap Fetches: 209
6. 31.947 108.144 ↓ 1.8 49,707 1

Materialize (cost=1.56..43,183.80 rows=27,495 width=887) (actual time=0.129..108.144 rows=49,707 loops=1)

7. 10.070 76.197 ↑ 1.5 18,864 1

Nested Loop (cost=1.56..43,115.07 rows=27,495 width=887) (actual time=0.125..76.197 rows=18,864 loops=1)

8. 0.979 10.498 ↓ 2.5 2,649 1

Nested Loop (cost=0.99..654.29 rows=1,040 width=8) (actual time=0.093..10.498 rows=2,649 loops=1)

9. 0.268 2.549 ↓ 1.0 85 1

Nested Loop (cost=0.56..307.74 rows=81 width=12) (actual time=0.069..2.549 rows=85 loops=1)

10. 0.643 0.643 ↓ 1.0 117 1

Index Scan using industries_pkey on industries (cost=0.14..12.89 rows=115 width=8) (actual time=0.017..0.643 rows=117 loops=1)

  • Filter: (active AND is_published)
  • Rows Removed by Filter: 95
11. 1.638 1.638 ↑ 1.0 1 117

Index Scan using eatery_shipping_fees_eatery_id_idx on eatery_shipping_fees (cost=0.42..2.55 rows=1 width=4) (actual time=0.012..0.014 rows=1 loops=117)

  • Index Cond: (eatery_id = industries.eatery_id)
  • Filter: (active AND is_published)
  • Rows Removed by Filter: 0
12. 6.970 6.970 ↑ 3.7 31 85

Index Scan using group_dishes_eatery_id_active_idx on group_dishes (cost=0.43..3.14 rows=114 width=8) (actual time=0.012..0.082 rows=31 loops=85)

  • Index Cond: (eatery_id = eatery_shipping_fees.eatery_id)
13. 55.629 55.629 ↑ 175.6 7 2,649

Index Scan using dishes_group_dish_id_idx on dishes (cost=0.56..28.54 rows=1,229 width=883) (actual time=0.008..0.021 rows=7 loops=2,649)

  • Index Cond: (group_dish_id = group_dishes.id)
Planning time : 3.764 ms
Execution time : 13,755.112 ms