explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R17y

Settings
# exclusive inclusive rows x rows loops node
1. 0.094 0.567 ↓ 20.0 20 1

Nested Loop (cost=0.56..359.71 rows=1 width=48) (actual time=0.032..0.567 rows=20 loops=1)

  • Join Filter: (surgical_plans.patient_id = patient.patient_id)
2. 0.010 0.433 ↓ 20.0 20 1

Nested Loop (cost=0.28..358.56 rows=1 width=32) (actual time=0.017..0.433 rows=20 loops=1)

3. 0.363 0.363 ↓ 1.8 20 1

Seq Scan on surgical_plans (cost=0.00..279.18 rows=11 width=32) (actual time=0.009..0.363 rows=20 loops=1)

  • Filter: (plan_status_selection = 'approved'::text)
  • Rows Removed by Filter: 1,258
4. 0.060 0.060 ↑ 1.0 1 20

Index Scan using case_details_pkey on case_details (cost=0.28..7.21 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=20)

  • Index Cond: (id = surgical_plans.case_details_fk)
  • Filter: (surgical_plans.patient_id = patient_id)
5. 0.040 0.040 ↑ 1.0 1 20

Index Scan using patient_patient_id_key on patient (cost=0.28..1.13 rows=1 width=1,321) (actual time=0.002..0.002 rows=1 loops=20)

  • Index Cond: (patient_id = case_details.patient_id)
Planning time : 0.579 ms
Execution time : 0.622 ms