explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sEsX

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 0.492 ↓ 9.0 9 1

Nested Loop Left Join (cost=3.71..144.85 rows=1 width=747) (actual time=0.204..0.492 rows=9 loops=1)

2. 0.012 0.453 ↓ 9.0 9 1

Nested Loop Left Join (cost=3.56..136.42 rows=1 width=836) (actual time=0.187..0.453 rows=9 loops=1)

3. 0.012 0.414 ↓ 9.0 9 1

Nested Loop Left Join (cost=3.42..128.00 rows=1 width=849) (actual time=0.172..0.414 rows=9 loops=1)

  • Join Filter: (hai.hotel_id = h.id)
4. 0.008 0.384 ↓ 9.0 9 1

Nested Loop Left Join (cost=2.73..103.13 rows=1 width=785) (actual time=0.159..0.384 rows=9 loops=1)

5. 0.009 0.367 ↓ 9.0 9 1

Nested Loop Left Join (cost=2.45..94.81 rows=1 width=785) (actual time=0.150..0.367 rows=9 loops=1)

  • Join Filter: (ha.hotel_id = h.id)
6. 0.007 0.331 ↓ 9.0 9 1

Nested Loop Left Join (cost=2.31..86.63 rows=1 width=769) (actual time=0.136..0.331 rows=9 loops=1)

  • Join Filter: (hs.hotel_id = h.id)
7. 0.014 0.297 ↓ 9.0 9 1

Nested Loop Left Join (cost=2.16..78.45 rows=1 width=761) (actual time=0.122..0.297 rows=9 loops=1)

8. 0.015 0.274 ↓ 9.0 9 1

Nested Loop (cost=2.02..72.21 rows=1 width=543) (actual time=0.113..0.274 rows=9 loops=1)

  • Join Filter: (r.id = ANY (rp.room_ids))
9. 0.012 0.214 ↓ 9.0 9 1

Nested Loop (cost=1.73..71.88 rows=1 width=420) (actual time=0.086..0.214 rows=9 loops=1)

  • Join Filter: (r.id = rr.room_id)
10. 0.012 0.139 ↓ 9.0 9 1

Nested Loop (cost=1.29..64.25 rows=1 width=399) (actual time=0.051..0.139 rows=9 loops=1)

11. 0.006 0.109 ↓ 9.0 9 1

Nested Loop (cost=1.01..55.94 rows=1 width=391) (actual time=0.044..0.109 rows=9 loops=1)

12. 0.006 0.067 ↓ 9.0 9 1

Nested Loop (cost=0.72..47.62 rows=1 width=216) (actual time=0.034..0.067 rows=9 loops=1)

13. 0.031 0.031 ↑ 1.3 3 1

Index Scan using rooms_hotel_id_idx on rooms r (cost=0.29..13.75 rows=4 width=186) (actual time=0.019..0.031 rows=3 loops=1)

  • Index Cond: (hotel_id = 38)
  • Filter: ((NOT is_deleted) AND is_active)
  • Rows Removed by Filter: 16
14. 0.030 0.030 ↓ 3.0 3 3

Index Scan using room_allotments_room_id_date_idx on room_allotments ra (cost=0.43..8.46 rows=1 width=30) (actual time=0.007..0.010 rows=3 loops=3)

  • Index Cond: ((room_id = r.id) AND (date >= '2020-11-13'::date) AND (date <= '2020-11-15'::date))
  • Filter: (NOT is_deleted)
15. 0.036 0.036 ↑ 1.0 1 9

Index Scan using hotel_id_pk on hotels h (cost=0.29..8.30 rows=1 width=183) (actual time=0.004..0.004 rows=1 loops=9)

  • Index Cond: (id = 38)
  • Filter: ((NOT is_deleted) AND (active_status = 2))
16. 0.018 0.018 ↑ 1.0 1 9

Index Scan using hotel_comissions_hotel_id_idx on hotel_commissions hc (cost=0.29..8.30 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=9)

  • Index Cond: (hotel_id = 38)
17. 0.063 0.063 ↑ 1.0 1 9

Index Scan using room_rates_room_id_date_idx on room_rates rr (cost=0.43..7.62 rows=1 width=41) (actual time=0.007..0.007 rows=1 loops=9)

  • Index Cond: ((room_id = ra.room_id) AND (date = ra.date))
  • Filter: (NOT is_deleted)
18. 0.045 0.045 ↑ 1.0 1 9

Index Scan using rate_plan_id_pk on rate_plans rp (cost=0.29..0.31 rows=1 width=156) (actual time=0.005..0.005 rows=1 loops=9)

  • Index Cond: (id = rr.rate_plan_id)
  • Filter: (is_active AND (NOT is_deleted))
19. 0.009 0.009 ↓ 0.0 0 9

Index Scan using mst_room_types_id_pk on mst_room_types mrt (cost=0.14..6.16 rows=1 width=222) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (id = r.room_type_id)
20. 0.027 0.027 ↑ 1.0 1 9

Index Scan using hotel_softblocks_hotel_id_start_period_end_period_index on hotel_softblocks hs (cost=0.14..8.16 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=9)

  • Index Cond: (hotel_id = 38)
  • Filter: (is_active AND (NOT is_deleted))
21. 0.027 0.027 ↓ 0.0 0 9

Index Scan using announcement_hotel_id_unique on hotel_announcements ha (cost=0.14..8.17 rows=1 width=24) (actual time=0.003..0.003 rows=0 loops=9)

  • Index Cond: (hotel_id = 38)
  • Filter: (is_active AND (start_date <= '2020-11-13'::date) AND (end_date >= '2020-11-14'::date))
  • Rows Removed by Filter: 1
22. 0.009 0.009 ↓ 0.0 0 9

Index Scan using translation_uuid_unique on translations t (cost=0.28..8.29 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: ((uuid = ha.description_i18n_uuid) AND ((language)::text = 'en'::text))
  • Filter: (NOT is_deleted)
23. 0.000 0.018 ↓ 0.0 0 9

GroupAggregate (cost=0.70..24.84 rows=1 width=72) (actual time=0.002..0.002 rows=0 loops=9)

  • Group Key: hai.hotel_id
24. 0.000 0.018 ↓ 0.0 0 9

Nested Loop Left Join (cost=0.70..24.82 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=9)

25. 0.009 0.018 ↓ 0.0 0 9

Nested Loop Left Join (cost=0.42..16.49 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=9)

26. 0.009 0.009 ↓ 0.0 0 9

Index Scan using hotel_additional_instructions_hotel_id_idx on hotel_additional_instructions hai (cost=0.14..8.16 rows=1 width=40) (actual time=0.001..0.001 rows=0 loops=9)

  • Index Cond: (hotel_id = 38)
27. 0.000 0.000 ↓ 0.0 0

Index Scan using translation_uuid_unique on translations tr (cost=0.28..8.29 rows=1 width=32) (never executed)

  • Index Cond: ((uuid = hai.title_i18n_uuid) AND ((language)::text = 'en'::text))
  • Filter: (NOT is_deleted)
28. 0.000 0.000 ↓ 0.0 0

Index Scan using translation_uuid_unique on translations tr2 (cost=0.28..8.29 rows=1 width=32) (never executed)

  • Index Cond: ((uuid = hai.description_i18n_uuid) AND ((language)::text = 'en'::text))
  • Filter: (NOT is_deleted)
29. 0.027 0.027 ↑ 1.0 1 9

Index Scan using country_id_pk on countries c (cost=0.14..8.16 rows=1 width=90) (actual time=0.003..0.003 rows=1 loops=9)

  • Index Cond: ((h.country_id)::text = (id)::text)
  • Filter: (NOT is_deleted)
30. 0.018 0.018 ↑ 1.0 1 9

Index Scan using region_id_pk on regions rg (cost=0.14..8.16 rows=1 width=90) (actual time=0.002..0.002 rows=1 loops=9)

  • Index Cond: ((h.region_id)::text = (id)::text)
  • Filter: (NOT is_deleted)
Planning time : 20.151 ms
Execution time : 1.249 ms