explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GKPR

Settings
# exclusive inclusive rows x rows loops node
1. 0.130 19.074 ↑ 1.0 1 1

Aggregate (cost=7,201.28..7,201.30 rows=1 width=996) (actual time=19.074..19.074 rows=1 loops=1)

2. 0.013 18.944 ↓ 17.0 17 1

Nested Loop Left Join (cost=217.04..7,201.05 rows=1 width=433) (actual time=5.953..18.944 rows=17 loops=1)

3. 0.009 18.931 ↓ 17.0 17 1

Nested Loop Left Join (cost=216.77..7,194.46 rows=1 width=448) (actual time=5.950..18.931 rows=17 loops=1)

4. 0.039 18.922 ↓ 17.0 17 1

Nested Loop Left Join (cost=216.50..7,187.88 rows=1 width=463) (actual time=5.948..18.922 rows=17 loops=1)

  • Join Filter: (hb.id = e.itinerary_id)
  • Rows Removed by Join Filter: 119
5. 0.006 18.866 ↓ 17.0 17 1

Nested Loop Left Join (cost=216.50..7,186.72 rows=1 width=377) (actual time=5.938..18.866 rows=17 loops=1)

6. 0.012 18.826 ↓ 17.0 17 1

Nested Loop Left Join (cost=216.08..7,181.67 rows=1 width=369) (actual time=5.930..18.826 rows=17 loops=1)

7. 0.011 18.742 ↓ 8.0 8 1

Nested Loop (cost=215.65..7,164.98 rows=1 width=363) (actual time=5.919..18.742 rows=8 loops=1)

  • Join Filter: (hb.id = hbt.itinerary_id)
8. 0.009 18.699 ↓ 8.0 8 1

Nested Loop (cost=215.22..7,159.69 rows=1 width=348) (actual time=5.908..18.699 rows=8 loops=1)

9. 0.011 18.650 ↓ 8.0 8 1

Nested Loop (cost=214.79..7,153.00 rows=1 width=150) (actual time=5.890..18.650 rows=8 loops=1)

10. 0.066 0.855 ↑ 2.0 1 1

Hash Join (cost=191.76..210.23 rows=2 width=47) (actual time=0.766..0.855 rows=1 loops=1)

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

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

12. 0.005 0.738 ↑ 3.0 1 1

Hash (cost=191.72..191.72 rows=3 width=62) (actual time=0.738..0.738 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.009 0.733 ↑ 3.0 1 1

Bitmap Heap Scan on hotels h (cost=180.02..191.72 rows=3 width=62) (actual time=0.733..0.733 rows=1 loops=1)

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

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

  • Index Cond: ((name)::text ~~* '%The Papandayan%'::text)
15. 16.378 17.784 ↓ 4.0 8 1

Bitmap Heap Scan on hotel_bookings hb (cost=23.03..3,471.36 rows=2 width=111) (actual time=5.120..17.784 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,402
  • Heap Blocks: exact=10,128
16. 1.406 1.406 ↓ 12.3 10,862 1

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

  • Index Cond: (hotel_id = h.id)
17. 0.040 0.040 ↑ 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.005..0.005 rows=1 loops=8)

  • Index Cond: (itinerary_id = hb.id)
  • Filter: (((payment_method)::text = 'BANK_TRANSFER'::text) AND ((payment_status)::text = 'PENDING'::text))
18. 0.032 0.032 ↑ 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.004..0.004 rows=1 loops=8)

  • Index Cond: (itinerary_id = hp.itinerary_id)
19. 0.072 0.072 ↑ 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.004..0.009 rows=2 loops=8)

  • Index Cond: (hb.id = itinerary_id)
20. 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)
21. 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)

22. 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)
23. 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.082 ms
Execution time : 19.365 ms