explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c36xm : With index on conversions on booking_request_id

Settings
# exclusive inclusive rows x rows loops node
1. 0.023 5.817 ↓ 8.0 8 1

Nested Loop Semi Join (cost=18.29..48.63 rows=1 width=1,731) (actual time=4.108..5.817 rows=8 loops=1)

2. 0.178 0.366 ↓ 46.0 46 1

Bitmap Heap Scan on booking_requests (cost=16.73..20.75 rows=1 width=1,731) (actual time=0.201..0.366 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=36
3. 0.004 0.188 ↓ 0.0 0 1

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

4. 0.067 0.067 ↓ 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.067..0.067 rows=47 loops=1)

  • Index Cond: (training_id = 724,736)
5. 0.117 0.117 ↓ 1.1 531 1

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

  • Index Cond: (domain_id = 43)
6. 0.116 5.428 ↓ 0.0 0 46

Nested Loop Left Join (cost=1.56..27.88 rows=1 width=8) (actual time=0.118..0.118 rows=0 loops=46)

  • Filter: (booking_request_invoice_appliances.id IS NULL)
  • Rows Removed by Filter: 1
7. 0.086 4.922 ↑ 1.0 1 46

Nested Loop Left Join (cost=1.27..27.52 rows=1 width=16) (actual time=0.105..0.107 rows=1 loops=46)

8. 0.092 4.416 ↑ 1.0 1 46

Nested Loop (cost=0.85..15.08 rows=1 width=8) (actual time=0.095..0.096 rows=1 loops=46)

9. 0.552 0.552 ↑ 1.0 1 46

Index Scan using index_conversions_on_booking_request_id on conversions (cost=0.43..8.45 rows=1 width=4) (actual time=0.012..0.012 rows=1 loops=46)

  • Index Cond: (booking_request_id = booking_requests.id)
  • Filter: (domain_id = 43)
10. 3.772 3.772 ↑ 1.0 1 41

Index Scan using booking_requests_pkey on booking_requests booking_requests_1 (cost=0.42..4.86 rows=1 width=4) (actual time=0.092..0.092 rows=1 loops=41)

  • Index Cond: (id = conversions.booking_request_id)
  • Filter: ((cancelled_at IS NULL) AND (confirmed_at IS NOT NULL) AND (training_id = 724,736) 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: 0
11. 0.420 0.420 ↑ 1.0 2 35

Index Scan using index_price_details_on_booking_request_id on booking_request_price_details (cost=0.42..12.42 rows=2 width=16) (actual time=0.010..0.012 rows=2 loops=35)

  • Index Cond: (booking_request_id = booking_requests_1.id)
  • Filter: ((deleted_at IS NULL) AND (type IS NULL))
  • Rows Removed by Filter: 1
12. 0.390 0.390 ↑ 1.0 1 65

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.006..0.006 rows=1 loops=65)

  • Index Cond: (booking_request_price_detail_id = booking_request_price_details.id)
  • Filter: active
  • Rows Removed by Filter: 1
Planning time : 5.169 ms
Execution time : 6.150 ms