explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lRSq

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 3,421.828 ↓ 0.0 0 1

Nested Loop Semi Join (cost=22.30..25,334.86 rows=1 width=1,727) (actual time=3,421.828..3,421.828 rows=0 loops=1)

  • Join Filter: (booking_requests.id = conversions.booking_request_id)
2. 0.082 0.236 ↓ 46.0 46 1

Bitmap Heap Scan on booking_requests (cost=16.73..20.75 rows=1 width=1,727) (actual time=0.170..0.236 rows=46 loops=1)

  • Recheck Cond: ((training_id = 724,736) AND (domain_id = 43))
  • Filter: ((created_at > '2016-01-01 00:00:00'::timestamp without time zone) AND (id <> 177016))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=38
3. 0.009 0.154 ↓ 0.0 0 1

BitmapAnd (cost=16.73..16.73 rows=1 width=0) (actual time=0.154..0.154 rows=0 loops=1)

4. 0.029 0.029 ↓ 6.7 47 1

Bitmap Index Scan on index_booking_requests_on_training_id (cost=0.00..4.47 rows=7 width=0) (actual time=0.029..0.029 rows=47 loops=1)

  • Index Cond: (training_id = 724,736)
5. 0.116 0.116 ↓ 1.0 487 1

Bitmap Index Scan on index_booking_requests_on_domain_id (cost=0.00..12.01 rows=478 width=0) (actual time=0.116..0.116 rows=487 loops=1)

  • Index Cond: (domain_id = 43)
6. 0.230 3,421.572 ↓ 0.0 0 46

Nested Loop (cost=5.58..25,314.10 rows=1 width=8) (actual time=74.382..74.382 rows=0 loops=46)

7. 1.288 26.266 ↓ 3.0 3 46

Nested Loop Left Join (cost=5.15..67.66 rows=1 width=4) (actual time=0.088..0.571 rows=3 loops=46)

  • Filter: (booking_request_invoice_appliances.id IS NULL)
  • Rows Removed by Filter: 84
8. 3.680 16.974 ↓ 21.8 87 46

Nested Loop Left Join (cost=4.86..66.26 rows=4 width=12) (actual time=0.011..0.369 rows=87 loops=46)

9. 2.530 2.530 ↓ 13.0 39 46

Index Scan using index_booking_requests_on_training_id on booking_requests booking_requests_1 (cost=0.42..29.25 rows=3 width=4) (actual time=0.005..0.055 rows=39 loops=46)

  • Index Cond: (training_id = 724,736)
  • Filter: ((cancelled_at IS NULL) AND (confirmed_at IS NOT NULL) AND (domain_id = ANY ('{10,18,43,14,48,101,103,104,105,109,115,138,149,237,150,195,209,211,215,223,222,225,227,229,233,234,235,236,238,240,242,245,246,248,249,250,253,254,255,261}'::integer[])))
  • Rows Removed by Filter: 8
10. 5.382 10.764 ↑ 1.0 2 1,794

Bitmap Heap Scan on booking_request_price_details (cost=4.44..12.32 rows=2 width=16) (actual time=0.004..0.006 rows=2 loops=1,794)

  • Recheck Cond: (booking_request_id = booking_requests_1.id)
  • Filter: ((deleted_at IS NULL) AND (type IS NULL))
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=4,140
11. 5.382 5.382 ↓ 2.0 4 1,794

Bitmap Index Scan on index_price_details_on_booking_request_id (cost=0.00..4.43 rows=2 width=0) (actual time=0.003..0.003 rows=4 loops=1,794)

  • Index Cond: (booking_request_id = booking_requests_1.id)
12. 8.004 8.004 ↑ 1.0 1 4,002

Index Scan using booking_request_invoices_price_detail_idy on booking_request_invoice_appliances (cost=0.29..0.34 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=4,002)

  • Index Cond: (booking_request_price_detail_id = booking_request_price_details.id)
  • Filter: active
  • Rows Removed by Filter: 0
13. 3,395.076 3,395.076 ↓ 0.0 0 138

Index Scan using index_conversions_on_booking_request_id on conversions (cost=0.43..25,246.43 rows=1 width=4) (actual time=24.602..24.602 rows=0 loops=138)

  • Index Cond: (booking_request_id = booking_requests_1.id)
  • Filter: (domain_id = 43)
Planning time : 2.321 ms
Execution time : 3,422.049 ms