explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GcBJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.088 0.554 ↓ 1.8 20 1

Nested Loop (cost=0.56..371.01 rows=11 width=48) (actual time=0.030..0.554 rows=20 loops=1)

2. 0.027 0.426 ↓ 1.8 20 1

Nested Loop (cost=0.28..358.43 rows=11 width=16) (actual time=0.015..0.426 rows=20 loops=1)

3. 0.359 0.359 ↓ 1.8 20 1

Seq Scan on surgical_plans (cost=0.00..279.18 rows=11 width=16) (actual time=0.007..0.359 rows=20 loops=1)

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

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

  • Index Cond: (id = surgical_plans.case_details_fk)
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.405 ms
Execution time : 0.603 ms