explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qs9D

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 22.696 ↑ 1.0 6 1

Limit (cost=277.04..604.90 rows=6 width=1,041) (actual time=21.018..22.696 rows=6 loops=1)

  • Buffers: shared hit=211 read=4
  • I/O Timings: read=1.766
2. 1.687 22.677 ↑ 266,595.5 11 1

Nested Loop Left Join (cost=3.82..160,243,401.10 rows=2,932,551 width=1,041) (actual time=19.297..22.677 rows=11 loops=1)

  • Join Filter: (pg_timezone_names.name = (ride_details.appt_timezone)::text)
  • Rows Removed by Join Filter: 5,951
  • Buffers: shared hit=211 read=4
  • I/O Timings: read=1.766
3. 0.013 2.609 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=3.82..3,431,601.20 rows=587,509 width=811) (actual time=1.985..2.609 rows=11 loops=1)

  • Buffers: shared hit=186 read=4
  • I/O Timings: read=1.766
4. 0.211 2.585 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=3.53..3,249,865.10 rows=587,509 width=793) (actual time=1.977..2.585 rows=11 loops=1)

  • Join Filter: (dynamite_claims.payer_id = org_payers.id)
  • Rows Removed by Join Filter: 847
  • Buffers: shared hit=186 read=4
  • I/O Timings: read=1.766
5. 0.012 2.154 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=3.53..2,571,639.11 rows=587,509 width=772) (actual time=1.888..2.154 rows=11 loops=1)

  • Buffers: shared hit=185 read=4
  • I/O Timings: read=1.766
6. 0.010 2.131 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=3.25..2,395,719.15 rows=587,509 width=749) (actual time=1.880..2.131 rows=11 loops=1)

  • Buffers: shared hit=185 read=4
  • I/O Timings: read=1.766
7. 0.011 2.110 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=2.96..2,211,453.45 rows=587,509 width=719) (actual time=1.874..2.110 rows=11 loops=1)

  • Buffers: shared hit=185 read=4
  • I/O Timings: read=1.766
8. 0.010 2.066 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=2.54..1,919,169.39 rows=587,509 width=711) (actual time=1.866..2.066 rows=11 loops=1)

  • Buffers: shared hit=141 read=4
  • I/O Timings: read=1.766
9. 0.008 2.045 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=2.25..1,736,204.01 rows=587,509 width=688) (actual time=1.860..2.045 rows=11 loops=1)

  • Buffers: shared hit=141 read=4
  • I/O Timings: read=1.766
10. 0.013 2.026 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=1.98..1,560,714.76 rows=587,509 width=674) (actual time=1.854..2.026 rows=11 loops=1)

  • Buffers: shared hit=141 read=4
  • I/O Timings: read=1.766
11. 0.014 2.002 ↑ 53,409.9 11 1

Nested Loop Left Join (cost=1.69..1,383,682.02 rows=587,509 width=591) (actual time=1.845..2.002 rows=11 loops=1)

  • Buffers: shared hit=141 read=4
  • I/O Timings: read=1.766
12. 0.018 1.955 ↑ 53,409.9 11 1

Nested Loop (cost=1.27..1,096,291.22 rows=587,509 width=543) (actual time=1.834..1.955 rows=11 loops=1)

  • Buffers: shared hit=97 read=4
  • I/O Timings: read=1.766
13. 0.043 1.893 ↑ 53,409.9 11 1

Nested Loop (cost=0.85..730,561.06 rows=587,509 width=426) (actual time=1.819..1.893 rows=11 loops=1)

  • Buffers: shared hit=53 read=4
  • I/O Timings: read=1.766
14. 0.948 0.948 ↑ 55,172.0 11 1

Index Scan using appt_id_and_id_ride_details_idx on ride_details (cost=0.42..397,355.47 rows=606,892 width=422) (actual time=0.930..0.948 rows=11 loops=1)

  • Buffers: shared hit=11 read=2
  • I/O Timings: read=0.898
15. 0.902 0.902 ↑ 1.0 1 11

Index Scan using idx_ride_detail_id on receipts (cost=0.42..0.55 rows=1 width=8) (actual time=0.082..0.082 rows=1 loops=11)

  • Index Cond: (ride_detail_id = ride_details.id)
  • Buffers: shared hit=42 read=2
  • I/O Timings: read=0.868
16. 0.044 0.044 ↑ 1.0 1 11

Index Scan using appt_id_idx on appointments (cost=0.42..0.62 rows=1 width=117) (actual time=0.004..0.004 rows=1 loops=11)

  • Index Cond: (id = ride_details.appt_id)
  • Buffers: shared hit=44
17. 0.033 0.033 ↑ 1.0 1 11

Index Scan using patients_pkey on patients (cost=0.42..0.49 rows=1 width=56) (actual time=0.003..0.003 rows=1 loops=11)

  • Index Cond: (ride_details.patient_id = id)
  • Buffers: shared hit=44
18. 0.011 0.011 ↓ 0.0 0 11

Index Scan using organisations_pkey on organisations (cost=0.28..0.30 rows=1 width=91) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: (ride_details.org_id = id)
19. 0.011 0.011 ↓ 0.0 0 11

Index Scan using market_segments_pkey on market_segments (cost=0.27..0.30 rows=1 width=22) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: (id = organisations.market_segment_id)
20. 0.011 0.011 ↓ 0.0 0 11

Index Scan using users_pkey on users (cost=0.29..0.31 rows=1 width=27) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: (ride_details.ride_requester_id = id)
21. 0.033 0.033 ↑ 1.0 1 11

Index Scan using idx_invoice_aptid on invoices (cost=0.42..0.50 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=11)

  • Index Cond: (appt_id = appointments.id)
  • Buffers: shared hit=44
22. 0.011 0.011 ↓ 0.0 0 11

Index Scan using dynamite_claims_pkey on dynamite_claims (cost=0.29..0.31 rows=1 width=38) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: (appointments.dynamite_claims_id = id)
23. 0.011 0.011 ↓ 0.0 0 11

Index Scan using dynamite_claims_adjuster_pkey on dynamite_claims_adjuster (cost=0.28..0.30 rows=1 width=31) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: (dynamite_claims.claims_adjuster_id = id)
24. 0.195 0.220 ↑ 1.0 77 11

Materialize (cost=0.00..2.16 rows=77 width=29) (actual time=0.001..0.020 rows=77 loops=11)

  • Buffers: shared hit=1
25. 0.025 0.025 ↑ 1.0 77 1

Seq Scan on org_payers (cost=0.00..1.77 rows=77 width=29) (actual time=0.004..0.025 rows=77 loops=1)

  • Buffers: shared hit=1
26. 0.011 0.011 ↓ 0.0 0 11

Index Scan using organisations_pkey on organisations req_org (cost=0.29..0.31 rows=1 width=22) (actual time=0.001..0.001 rows=0 loops=11)

  • Index Cond: (((appointments.additional_details ->> 'requesting_organization'::text))::integer = id)
27. 18.304 18.304 ↑ 1.8 542 11

Function Scan on pg_timezone_names (cost=0.00..10.00 rows=1,000 width=64) (actual time=1.554..1.664 rows=542 loops=11)

28.          

SubPlan (for Nested Loop Left Join)

29. 0.033 0.077 ↓ 0.0 0 11

Sort (cost=48.85..48.86 rows=4 width=36) (actual time=0.007..0.007 rows=0 loops=11)

  • Sort Key: questions.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=25
30. 0.011 0.044 ↓ 0.0 0 11

Nested Loop (cost=0.84..48.81 rows=4 width=36) (actual time=0.004..0.004 rows=0 loops=11)

  • Buffers: shared hit=22
31. 0.011 0.033 ↓ 0.0 0 11

Nested Loop (cost=0.56..47.53 rows=4 width=38) (actual time=0.003..0.003 rows=0 loops=11)

  • Buffers: shared hit=22
32. 0.022 0.022 ↓ 0.0 0 11

Index Scan using answers_appt_id_idx on answers (cost=0.29..18.33 rows=4 width=10) (actual time=0.002..0.002 rows=0 loops=11)

  • Index Cond: (appt_id = appointments.id)
  • Buffers: shared hit=22
33. 0.000 0.000 ↓ 0.0 0

Index Scan using question_pkey on questions (cost=0.28..7.29 rows=1 width=32) (never executed)

  • Index Cond: (id = answers.question_id)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using questionnaire_pkey on questionnaires (cost=0.27..0.32 rows=1 width=10) (never executed)

  • Index Cond: (id = questions.questionnaire_id)
Planning time : 19.975 ms
Execution time : 23.254 ms