explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TFdI : test

Settings
# exclusive inclusive rows x rows loops node
1. 1.825 1,397.292 ↑ 1.0 17 1

Limit (cost=1,018.34..117,767.05 rows=17 width=496) (actual time=1,373.952..1,397.292 rows=17 loops=1)

2. 0.307 1,395.467 ↑ 18.1 17 1

Nested Loop Left Join (cost=1,018.34..2,116,230.26 rows=308 width=496) (actual time=1,373.951..1,395.467 rows=17 loops=1)

3. 0.675 1,395.092 ↑ 18.1 17 1

Nested Loop Left Join (cost=1,002.54..2,111,246.76 rows=308 width=489) (actual time=1,373.877..1,395.092 rows=17 loops=1)

  • Join Filter: (appointment.recurrence_id = recurrence_rides.id)
  • Rows Removed by Join Filter: 11,339
4. 9.419 1,391.748 ↑ 18.1 17 1

Gather Merge (cost=1,002.54..2,108,176.58 rows=308 width=487) (actual time=1,373.179..1,391.748 rows=17 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 0.054 1,382.329 ↑ 5.6 23 3 / 3

Nested Loop Left Join (cost=2.52..2,107,141.00 rows=128 width=487) (actual time=1,364.127..1,382.329 rows=23 loops=3)

6. 0.054 1,382.042 ↑ 5.6 23 3 / 3

Nested Loop Left Join (cost=2.09..2,106,075.00 rows=128 width=432) (actual time=1,364.106..1,382.042 rows=23 loops=3)

7. 0.056 1,381.965 ↑ 5.6 23 3 / 3

Nested Loop (cost=1.67..2,105,298.04 rows=128 width=424) (actual time=1,364.089..1,381.965 rows=23 loops=3)

8. 0.062 1,381.839 ↑ 5.6 23 3 / 3

Nested Loop (cost=1.40..2,105,027.86 rows=128 width=351) (actual time=1,364.070..1,381.839 rows=23 loops=3)

9. 0.070 1,381.660 ↑ 5.6 23 3 / 3

Nested Loop (cost=0.98..2,104,054.25 rows=128 width=324) (actual time=1,364.051..1,381.660 rows=23 loops=3)

10. 1,381.333 1,381.333 ↑ 5.6 23 3 / 3

Parallel Index Scan using ride_detail_appt_date_time on ride_details ride (cost=0.55..2,102,995.22 rows=128 width=248) (actual time=1,364.011..1,381.333 rows=23 loops=3)

  • Filter: ((NOT is_pr_ride) AND (NULLIF(leg_no, 1) IS NULL) AND ((ride_status)::text = ANY ('{Confirmed,"Failed Fuse","Potential Unavailability","Pending Approval","Offer Created",UATP,NEPF,"Potential Unavailability","Pending Approval",NDA,"No Driver Assigned","Order Updated",Offered,"Pending - Re-Offer","24 Hour Confirmation Missing","Validation Failed","Offered NDA"}'::text[])))
  • Rows Removed by Filter: 609,461
11. 0.257 0.257 ↑ 1.0 1 70 / 3

Index Scan using appointments_pkey on appointments appointment (cost=0.42..8.27 rows=1 width=76) (actual time=0.011..0.011 rows=1 loops=70)

  • Index Cond: (id = ride.appt_id)
12. 0.117 0.117 ↑ 1.0 1 70 / 3

Index Scan using patients_pkey on patients patient (cost=0.42..7.61 rows=1 width=31) (actual time=0.005..0.005 rows=1 loops=70)

  • Index Cond: (id = ride.patient_id)
13. 0.070 0.070 ↑ 1.0 1 70 / 3

Index Scan using organisations_pkey on organisations org (cost=0.28..2.11 rows=1 width=77) (actual time=0.003..0.003 rows=1 loops=70)

  • Index Cond: (id = ride.org_id)
14. 0.023 0.023 ↓ 0.0 0 70 / 3

Index Scan using users_pkey on users main_contact (cost=0.42..6.07 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=70)

  • Index Cond: (id = org.main_contact_id)
15. 0.233 0.233 ↑ 1.0 1 70 / 3

Index Scan using ride_detail_id_unique on ride_additional_details (cost=0.43..8.33 rows=1 width=59) (actual time=0.010..0.010 rows=1 loops=70)

  • Index Cond: (ride.id = ride_detail_id)
16. 2.429 2.669 ↓ 1.0 667 17

Materialize (cost=0.00..31.87 rows=658 width=6) (actual time=0.001..0.157 rows=667 loops=17)

17. 0.240 0.240 ↓ 1.0 667 1

Seq Scan on recurrence_rides (cost=0.00..28.58 rows=658 width=6) (actual time=0.010..0.240 rows=667 loops=1)

18. 0.000 0.068 ↓ 0.0 0 17

Index Scan using idx_phone_number_zip_zip_code on phone_number_zip (cost=15.80..16.15 rows=1 width=23) (actual time=0.004..0.004 rows=0 loops=17)

  • Index Cond: ((zip_code)::text = (SubPlan 2))
  • Filter: (org_id = ride.org_id)
19.          

SubPlan (for Index Scan)

20. 0.051 0.255 ↑ 1.0 1 17

Limit (cost=7.50..15.52 rows=1 width=32) (actual time=0.014..0.015 rows=1 loops=17)

21.          

Initplan (for Limit)

22. 0.017 0.136 ↑ 1.0 1 17

Limit (cost=0.43..7.07 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=17)

23. 0.119 0.119 ↑ 2.0 1 17

Index Scan using idx_appt_id_ride_detail on ride_details riden (cost=0.43..13.72 rows=2 width=4) (actual time=0.007..0.007 rows=1 loops=17)

  • Index Cond: (ride.appt_id = appt_id)
  • Filter: (leg_no = 1)
  • Rows Removed by Filter: 1
24. 0.068 0.068 ↑ 1.0 1 17

Index Scan using ride_detail_id_unique on ride_additional_details ride_additional_details_1 (cost=0.43..8.45 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=17)

  • Index Cond: (ride_detail_id = $1)
Planning time : 17.533 ms
Execution time : 1,397.669 ms