explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rnt

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.026 ↓ 0.0 0 1

Nested Loop Left Join (cost=22.51..1,066.17 rows=900 width=10,556) (actual time=0.026..0.026 rows=0 loops=1)

  • Join Filter: (market_segments.id = organisations.market_segment_id)
2. 0.000 0.023 ↓ 0.0 0 1

Nested Loop Left Join (cost=22.51..352.73 rows=900 width=10,677) (actual time=0.023..0.023 rows=0 loops=1)

  • Join Filter: (appointments.dynamite_claims_id = dynamite_claims.id)
3. 0.000 0.023 ↓ 0.0 0 1

Nested Loop (cost=0.92..49.93 rows=900 width=8,081) (actual time=0.023..0.023 rows=0 loops=1)

  • Join Filter: (rs.appt_id = appointments.id)
4. 0.001 0.023 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.80..49.72 rows=1 width=7,489) (actual time=0.023..0.023 rows=0 loops=1)

  • Join Filter: (rs.org_id = organisations.id)
5. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=0.66..41.55 rows=1 width=6,877) (actual time=0.022..0.022 rows=0 loops=1)

  • Join Filter: (rs.ride_requester_id = users.id)
6. 0.001 0.022 ↓ 0.0 0 1

Nested Loop (cost=0.54..33.40 rows=1 width=6,881) (actual time=0.022..0.022 rows=0 loops=1)

7. 0.000 0.021 ↓ 0.0 0 1

Nested Loop (cost=0.39..25.22 rows=1 width=6,861) (actual time=0.021..0.021 rows=0 loops=1)

8. 0.001 0.021 ↓ 0.0 0 1

Nested Loop (cost=0.25..16.30 rows=1 width=5,729) (actual time=0.021..0.021 rows=0 loops=1)

  • Join Filter: (rs.patient_id = patients.id)
9. 0.020 0.020 ↓ 0.0 0 1

Index Scan using appt_id_and_id_ride_details_idx on ride_details rs (cost=0.12..8.14 rows=1 width=4,669) (actual time=0.020..0.020 rows=0 loops=1)

  • Filter: ((NOT is_pr_ride) AND (org_id = 1,153) AND ((ride_category)::text = 'completed'::text))
10. 0.000 0.000 ↓ 0.0 0

Index Scan using patients_pkey on patients (cost=0.12..8.14 rows=1 width=1,068) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Index Scan using unique_receipts_id on receipts (cost=0.14..8.15 rows=1 width=1,136) (never executed)

  • Index Cond: (ride_detail_id = rs.id)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_invoice_aptid on invoices (cost=0.15..8.17 rows=1 width=20) (never executed)

  • Index Cond: (appt_id = rs.appt_id)
13. 0.000 0.000 ↓ 0.0 0

Index Only Scan using users_id_is_del_default_org_id on users (cost=0.12..8.14 rows=1 width=4) (never executed)

  • Heap Fetches: 0
14. 0.000 0.000 ↓ 0.0 0

Index Scan using organisations_pkey on organisations (cost=0.14..8.15 rows=1 width=620) (never executed)

  • Index Cond: (id = 1,153)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using appt_id_idx on appointments (cost=0.12..0.20 rows=1 width=600) (never executed)

  • Index Cond: (id = invoices.appt_id)
  • Filter: (invoice_generated AND (invoice_generation_time >= 1,546,300,800) AND (invoice_generation_time <= 1,567,727,999))
16. 0.000 0.000 ↓ 0.0 0

Materialize (cost=21.59..32.85 rows=20 width=2,604) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=21.59..32.75 rows=20 width=2,604) (never executed)

  • Hash Cond: (org_payers.id = dynamite_claims.payer_id)
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on org_payers (cost=0.00..10.70 rows=70 width=524) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Hash (cost=21.34..21.34 rows=20 width=2,088) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=10.45..21.34 rows=20 width=2,088) (never executed)

  • Hash Cond: (dynamite_claims_adjuster.id = dynamite_claims.claims_adjuster_id)
21. 0.000 0.000 ↓ 0.0 0

Seq Scan on dynamite_claims_adjuster (cost=0.00..10.50 rows=50 width=1,552) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Hash (cost=10.20..10.20 rows=20 width=544) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Seq Scan on dynamite_claims (cost=0.00..10.20 rows=20 width=544) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..10.60 rows=40 width=520) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Seq Scan on market_segments (cost=0.00..10.40 rows=40 width=520) (never executed)

Planning time : 4.471 ms
Execution time : 0.385 ms