explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MB9d

Settings
# exclusive inclusive rows x rows loops node
1. 386.345 6,477.516 ↑ 1.0 1 1

Aggregate (cost=158,637.65..158,637.66 rows=1 width=0) (actual time=6,477.515..6,477.516 rows=1 loops=1)

2. 1,101.519 6,091.171 ↓ 1.3 559,474 1

Hash Left Join (cost=15,900.61..157,567.05 rows=428,237 width=0) (actual time=658.183..6,091.171 rows=559,474 loops=1)

  • Hash Cond: (b.boekingid = ab2.booking_id_return)
3. 1,074.855 4,913.052 ↓ 1.3 559,474 1

Hash Left Join (cost=13,413.00..150,502.77 rows=428,237 width=4) (actual time=581.564..4,913.052 rows=559,474 loops=1)

  • Hash Cond: (b.boekingid = ab1.booking_id)
4. 794.008 3,731.983 ↓ 1.3 559,474 1

Hash Join (cost=10,925.39..143,434.41 rows=428,237 width=4) (actual time=475.321..3,731.983 rows=559,474 loops=1)

  • Hash Cond: (b.from_land_id = c1.id)
5. 1,423.541 2,937.562 ↓ 1.3 559,474 1

Hash Join (cost=10,916.67..137,537.43 rows=428,237 width=8) (actual time=474.896..2,937.562 rows=559,474 loops=1)

  • Hash Cond: (b.client_id = cl.client_id)
6. 1,039.239 1,039.239 ↓ 1.3 559,474 1

Index Scan using boeking_substatus_id_index on boeking b (cost=0.45..118,591.77 rows=428,237 width=12) (actual time=0.024..1,039.239 rows=559,474 loops=1)

  • Index Cond: (substatus_id = ANY ('{1,2,3,12,13,14,16,17,20,4,5,15,18,19,7,8,9,10,11}'::integer[]))
7. 255.771 474.782 ↓ 1.0 344,818 1

Hash (cost=6,667.22..6,667.22 rows=339,920 width=4) (actual time=474.782..474.782 rows=344,818 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 12123kB
8. 219.011 219.011 ↓ 1.0 344,818 1

Index Only Scan using clients_pkey on clients cl (cost=0.42..6,667.22 rows=339,920 width=4) (actual time=0.027..219.011 rows=344,818 loops=1)

  • Heap Fetches: 1388
9. 0.225 0.413 ↑ 1.0 239 1

Hash (cost=5.73..5.73 rows=239 width=4) (actual time=0.413..0.413 rows=239 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.188 0.188 ↑ 1.0 239 1

Index Only Scan using countries_pkey on countries c1 (cost=0.14..5.73 rows=239 width=4) (actual time=0.020..0.188 rows=239 loops=1)

  • Heap Fetches: 0
11. 48.035 106.214 ↑ 1.3 39,019 1

Hash (cost=1,830.05..1,830.05 rows=52,605 width=4) (actual time=106.214..106.214 rows=39,019 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 1372kB
12. 58.179 58.179 ↓ 1.0 52,676 1

Seq Scan on affiliate_bookings ab1 (cost=0.00..1,830.05 rows=52,605 width=4) (actual time=0.006..58.179 rows=52,676 loops=1)

13. 31.707 76.600 ↑ 1.4 38,482 1

Hash (cost=1,830.05..1,830.05 rows=52,605 width=4) (actual time=76.600..76.600 rows=38,482 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 1353kB
14. 44.893 44.893 ↓ 1.0 52,676 1

Seq Scan on affiliate_bookings ab2 (cost=0.00..1,830.05 rows=52,605 width=4) (actual time=0.004..44.893 rows=52,676 loops=1)