explain.depesz.com

PostgreSQL's explain analyze made readable

Result: z6kv

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 19.265 ↓ 17.0 17 1

Nested Loop Left Join (cost=233.04..7,217.09 rows=1 width=506) (actual time=5.919..19.265 rows=17 loops=1)

2. 0.011 19.237 ↓ 17.0 17 1

Nested Loop Left Join (cost=232.77..7,210.48 rows=1 width=433) (actual time=5.910..19.237 rows=17 loops=1)

3. 0.040 19.226 ↓ 17.0 17 1

Nested Loop Left Join (cost=232.50..7,203.90 rows=1 width=448) (actual time=5.908..19.226 rows=17 loops=1)

  • Join Filter: (hb.id = e.itinerary_id)
  • Rows Removed by Join Filter: 119
4. 0.009 19.169 ↓ 17.0 17 1

Nested Loop Left Join (cost=232.50..7,202.74 rows=1 width=362) (actual time=5.896..19.169 rows=17 loops=1)

5. 0.016 19.126 ↓ 17.0 17 1

Nested Loop Left Join (cost=232.08..7,197.69 rows=1 width=354) (actual time=5.886..19.126 rows=17 loops=1)

6. 0.009 19.070 ↓ 8.0 8 1

Nested Loop (cost=231.65..7,181.00 rows=1 width=348) (actual time=5.875..19.070 rows=8 loops=1)

  • Join Filter: (hb.id = hbt.itinerary_id)
7. 0.008 19.021 ↓ 8.0 8 1

Nested Loop (cost=231.22..7,175.71 rows=1 width=341) (actual time=5.862..19.021 rows=8 loops=1)

8. 0.009 18.957 ↓ 8.0 8 1

Nested Loop (cost=230.79..7,169.02 rows=1 width=143) (actual time=5.840..18.957 rows=8 loops=1)

9. 0.068 0.914 ↑ 2.0 1 1

Hash Join (cost=207.76..226.23 rows=2 width=47) (actual time=0.829..0.914 rows=1 loops=1)

  • Hash Cond: ((c.id)::text = (h.country_id)::text)
10. 0.047 0.047 ↑ 1.0 459 1

Seq Scan on countries c (cost=0.00..15.59 rows=459 width=27) (actual time=0.004..0.047 rows=459 loops=1)

11. 0.003 0.799 ↑ 3.0 1 1

Hash (cost=207.72..207.72 rows=3 width=62) (actual time=0.799..0.799 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
12. 0.011 0.796 ↑ 3.0 1 1

Bitmap Heap Scan on hotels h (cost=196.02..207.72 rows=3 width=62) (actual time=0.796..0.796 rows=1 loops=1)

  • Recheck Cond: ((name)::text ~~* '%The Papandayan%'::text)
  • Heap Blocks: exact=1
13. 0.785 0.785 ↑ 3.0 1 1

Bitmap Index Scan on idx_trigram_hotel (cost=0.00..196.02 rows=3 width=0) (actual time=0.785..0.785 rows=1 loops=1)

  • Index Cond: ((name)::text ~~* '%The Papandayan%'::text)
14. 16.662 18.034 ↓ 4.0 8 1

Bitmap Heap Scan on hotel_bookings hb (cost=23.03..3,471.37 rows=2 width=104) (actual time=5.006..18.034 rows=8 loops=1)

  • Recheck Cond: (hotel_id = h.id)
  • Filter: (((booking_status)::text = 'issued'::text) AND (date(created_date) >= '2020-09-02'::date) AND (date(created_date) <= '2020-09-02'::date))
  • Rows Removed by Filter: 9,403
  • Heap Blocks: exact=10,130
15. 1.372 1.372 ↓ 12.3 10,864 1

Bitmap Index Scan on hotel_bookings_hotel_id_idx (cost=0.00..23.03 rows=880 width=0) (actual time=1.372..1.372 rows=10,864 loops=1)

  • Index Cond: (hotel_id = h.id)
16. 0.056 0.056 ↑ 1.0 1 8

Index Scan using hotel_payments_itinerary_id_unique on hotel_payments hp (cost=0.43..6.69 rows=1 width=198) (actual time=0.006..0.007 rows=1 loops=8)

  • Index Cond: (itinerary_id = hb.id)
  • Filter: (((payment_method)::text = 'BANK_TRANSFER'::text) AND ((payment_status)::text = 'PENDING'::text))
17. 0.040 0.040 ↑ 1.0 1 8

Index Scan using hotel_booking_traveller_hotel_booking_id_unique on hotel_booking_travellers hbt (cost=0.43..5.28 rows=1 width=23) (actual time=0.005..0.005 rows=1 loops=8)

  • Index Cond: (itinerary_id = hp.itinerary_id)
18. 0.040 0.040 ↑ 3.5 2 8

Index Scan using hotel_booking_detail_hotel_booking_id_checkin_date_unique on hotel_booking_details hbd (cost=0.43..16.62 rows=7 width=14) (actual time=0.005..0.005 rows=2 loops=8)

  • Index Cond: (hb.id = itinerary_id)
19. 0.034 0.034 ↓ 0.0 0 17

Index Scan using hotel_softblock_itenary_id_idx on hotel_softblock_transactions hst (cost=0.42..5.04 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=17)

  • Index Cond: (itinerary_id = hb.id)
20. 0.017 0.017 ↑ 1.0 7 17

Seq Scan on hotel_booking_entities e (cost=0.00..1.07 rows=7 width=102) (actual time=0.001..0.001 rows=7 loops=17)

21. 0.000 0.000 ↓ 0.0 0 17

Index Scan using country_id_pk on countries cc (cost=0.27..6.58 rows=1 width=27) (actual time=0.000..0.000 rows=0 loops=17)

  • Index Cond: ((e.country_id)::text = (id)::text)
22. 0.000 0.000 ↓ 0.0 0 17

Index Scan using country_id_pk on countries cp (cost=0.27..6.58 rows=1 width=27) (actual time=0.000..0.000 rows=0 loops=17)

  • Index Cond: ((e.country_pair_id)::text = (id)::text)
Planning time : 3.055 ms
Execution time : 19.453 ms