explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FPQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.699 27,475.661 ↓ 8.0 8 1

Nested Loop Semi Join (cost=18.29..22,953.17 rows=1 width=1,731) (actual time=17,029.303..27,475.661 rows=8 loops=1)

  • Join Filter: (booking_requests.id = conversions.booking_request_id)
  • Rows Removed by Join Filter: 1,131
2. 0.116 0.220 ↓ 46.0 46 1

Bitmap Heap Scan on booking_requests (cost=16.73..20.75 rows=1 width=1,731) (actual time=0.113..0.220 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.005 0.104 ↓ 0.0 0 1

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

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

  • Index Cond: (training_id = 724,736)
5. 0.078 0.078 ↓ 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.078..0.078 rows=531 loops=1)

  • Index Cond: (domain_id = 43)
6. 2.044 27,474.742 ↓ 25.0 25 46

Nested Loop (cost=1.56..22,932.41 rows=1 width=8) (actual time=66.995..597.277 rows=25 loops=46)

7. 2.497 32.522 ↓ 28.0 28 46

Nested Loop Left Join (cost=1.13..79.32 rows=1 width=4) (actual time=0.019..0.707 rows=28 loops=46)

  • Filter: (booking_request_invoice_appliances.id IS NULL)
  • Rows Removed by Filter: 54
8. 1.706 18.676 ↓ 16.4 82 46

Nested Loop Left Join (cost=0.84..77.57 rows=5 width=12) (actual time=0.014..0.406 rows=82 loops=46)

9. 3.082 3.082 ↓ 9.5 38 46

Index Scan using index_booking_requests_on_training_id on booking_requests booking_requests_1 (cost=0.42..27.79 rows=4 width=4) (actual time=0.008..0.067 rows=38 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. 13.888 13.888 ↑ 1.0 2 1,736

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.003..0.008 rows=2 loops=1,736)

  • Index Cond: (booking_request_id = booking_requests_1.id)
  • Filter: ((deleted_at IS NULL) AND (type IS NULL))
  • Rows Removed by Filter: 2
11. 11.349 11.349 ↑ 1.0 1 3,783

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.003 rows=1 loops=3,783)

  • Index Cond: (booking_request_price_detail_id = booking_request_price_details.id)
  • Filter: active
  • Rows Removed by Filter: 0
12. 27,440.176 27,440.176 ↑ 1.0 1 1,277

Index Scan using index_conversions_on_booking_request_id on conversions (cost=0.43..22,853.08 rows=1 width=4) (actual time=3.754..21.488 rows=1 loops=1,277)

  • Index Cond: (booking_request_id = booking_requests_1.id)
  • Filter: (domain_id = 43)
Planning time : 2.298 ms
Execution time : 27,475.806 ms