explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ADvC

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Unique (cost=3.49..14,821.30 rows=14 width=7) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.49..9,410.78 rows=2,164,209 width=7) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.21..3,831.71 rows=2,146 width=11) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.06..3,412.43 rows=2,579 width=19) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.92..2,845.97 rows=3,539 width=15) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.63..2,287.72 rows=1,082 width=15) (actual rows= loops=)

  • Join Filter: ((travel_admin_type_regions.type_id = travel_admin_types.id) AND CASE WHEN (array_length(travel_admin_packages.provider_ids, 1) > 0) THEN (mv_hotels.company_id = ANY (travel_admin_packages.provider_ids)) ELSE (travel_admin_packages.id > 0) END)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..1,541.08 rows=7,072 width=23) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using idx_mv_hotels_star_category_id on mv_hotels (cost=0.28..351.69 rows=6,977 width=23) (actual rows= loops=)

  • Filter: active
9. 0.000 0.000 ↓ 0.0

Index Scan using idx_type_regions_region_id on travel_admin_type_regions (cost=0.14..0.16 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (region_id = mv_hotels.region_id)
10. 0.000 0.000 ↓ 0.0

Materialize (cost=2.21..4.09 rows=3 width=44) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.21..4.07 rows=3 width=44) (actual rows= loops=)

  • Hash Cond: (travel_admin_package_type_tours.type_id = travel_admin_types.id)
12. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.12..2.95 rows=9 width=40) (actual rows= loops=)

  • Hash Cond: (travel_admin_package_type_tours.package_id = travel_admin_packages.id)
13. 0.000 0.000 ↓ 0.0

Seq Scan on travel_admin_package_type_tours (cost=0.00..1.64 rows=64 width=8) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=1.07..1.07 rows=4 width=36) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on travel_admin_packages (cost=0.00..1.07 rows=4 width=36) (actual rows= loops=)

  • Filter: active
16. 0.000 0.000 ↓ 0.0

Hash (cost=1.04..1.04 rows=4 width=4) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on travel_admin_types (cost=0.00..1.04 rows=4 width=4) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using idx_board_group_board_id on travel_admin_board_groups (cost=0.29..0.45 rows=7 width=8) (actual rows= loops=)

  • Index Cond: (board_id = mv_hotels.board_id)
19. 0.000 0.000 ↓ 0.0

Index Only Scan using travel_admin_food_categories_pkey on travel_admin_food_categories (cost=0.14..0.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = travel_admin_board_groups.food_id)
20. 0.000 0.000 ↓ 0.0

Index Only Scan using travel_admin_foods_pkey on travel_admin_foods (cost=0.14..0.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = travel_admin_board_groups.food_id)
21. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_company_markets_market_id on travel_admin_company_markets (cost=0.28..1.76 rows=84 width=4) (actual rows= loops=)

  • Index Cond: (market_id = mv_hotels.market_id)