explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mftU

Settings
# exclusive inclusive rows x rows loops node
1. 1.754 16,956.285 ↑ 3.6 4,181 1

Nested Loop (cost=226,184.99..321,559.64 rows=14,947 width=40) (actual time=16,572.307..16,956.285 rows=4,181 loops=1)

2. 140.892 16,937.807 ↑ 3.6 4,181 1

Unique (cost=226,184.57..226,259.30 rows=14,947 width=4) (actual time=16,572.281..16,937.807 rows=4,181 loops=1)

3. 915.131 16,796.915 ↓ 125.6 1,877,718 1

Sort (cost=226,184.57..226,221.93 rows=14,947 width=4) (actual time=16,572.279..16,796.915 rows=1,877,718 loops=1)

  • Sort Key: room_types."hotelId
  • Sort Method: external merge Disk: 25744kB
4. 204.598 15,881.784 ↓ 125.6 1,877,718 1

Gather (cost=1,001.00..225,148.17 rows=14,947 width=4) (actual time=4.071..15,881.784 rows=1,877,718 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
5. 13,509.802 15,677.186 ↓ 301.5 1,877,718 1

Nested Loop (cost=1.00..222,653.47 rows=6,228 width=4) (actual time=3.580..15,677.186 rows=1,877,718 loops=1)

6. 151.688 2,166.601 ↓ 4.9 16,916 1

Nested Loop (cost=0.43..140,610.46 rows=3,419 width=8) (actual time=3.544..2,166.601 rows=16,916 loops=1)

7. 2,014.894 2,014.894 ↓ 8.2 6,902 1

Parallel Seq Scan on hotels hotels_1 (cost=0.00..119,814.33 rows=837 width=4) (actual time=3.518..2,014.894 rows=6,902 loops=1)

  • Filter: ("hotelDisplayable" AND (NOT "hotelDeleted") AND ("channelManagerPartnerID" = 13) AND ("hotelStatus" = 'Active'::"HotelStatus"))
  • Rows Removed by Filter: 789063
8. 0.019 0.019 ↑ 4.5 2 6,902

Index Scan using "room_types_Index01" on room_types (cost=0.43..24.49 rows=9 width=8) (actual time=0.013..0.019 rows=2 loops=6,902)

  • Index Cond: ("hotelId" = hotels_1."hotelID")
9. 0.783 0.783 ↓ 1.6 111 16,916

Index Scan using hotel_room_availability_pkey on room_availability (cost=0.57..21.20 rows=70 width=4) (actual time=0.453..0.783 rows=111 loops=16,916)

  • Index Cond: (("roomTypeId" = room_types."roomTypeId") AND (date > '2019-01-01'::date))
  • Filter: ((NOT locked) AND (capacity >= 1))
  • Rows Removed by Filter: 581
10. 16.724 16.724 ↑ 1.0 1 4,181

Index Scan using hotels_pkey on hotels (cost=0.42..6.34 rows=1 width=40) (actual time=0.004..0.004 rows=1 loops=4,181)

  • Index Cond: ("hotelID" = room_types."hotelId")