explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nfFe

Settings
# exclusive inclusive rows x rows loops node
1. 146.967 12,506.193 ↓ 2.1 4,181 1

Unique (cost=226,184.57..226,259.30 rows=2,009 width=40) (actual time=12,051.927..12,506.193 rows=4,181 loops=1)

2. 1,344.620 12,359.226 ↓ 125.6 1,877,718 1

Sort (cost=226,184.57..226,221.93 rows=14,947 width=40) (actual time=12,051.925..12,359.226 rows=1,877,718 loops=1)

  • Sort Key: hotels."hotelID
  • Sort Method: external merge Disk: 86832kB
3. 1,341.445 11,014.606 ↓ 125.6 1,877,718 1

Gather (cost=1,001.00..225,148.17 rows=14,947 width=40) (actual time=3.772..11,014.606 rows=1,877,718 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 8,783.027 9,673.161 ↓ 100.5 625,906 3

Nested Loop (cost=1.00..222,653.47 rows=6,228 width=40) (actual time=5.381..9,673.161 rows=625,906 loops=3)

5. 93.213 888.597 ↓ 1.6 5,639 3

Nested Loop (cost=0.43..140,610.46 rows=3,419 width=44) (actual time=1.860..888.597 rows=5,639 loops=3)

6. 795.351 795.351 ↓ 2.7 2,301 3

Parallel Seq Scan on hotels (cost=0.00..119,814.33 rows=837 width=40) (actual time=1.696..795.351 rows=2,301 loops=3)

  • Filter: ("hotelDisplayable" AND (NOT "hotelDeleted") AND ("channelManagerPartnerID" = 13) AND ("hotelStatus" = 'Active'::"HotelStatus"))
  • Rows Removed by Filter: 263021
7. 0.033 0.033 ↑ 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.022..0.033 rows=2 loops=6,902)

  • Index Cond: ("hotelId" = hotels."hotelID")
8. 1.537 1.537 ↓ 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.887..1.537 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