explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OkHM

Settings
# exclusive inclusive rows x rows loops node
1. 25.453 332.098 ↑ 1.0 1 1

Index Scan using pim_individual_pk on public.pim_individual i (cost=0.43..42.99 rows=1 width=69) (actual time=332.095..332.098 rows=1 loops=1)

  • Output: i.id, (SubPlan 1), i.name, i.surname, i.patr_name, (SubPlan 2), i.gender_id, i.birth_dt, i.death_dt, (SubPlan 3), (SubPlan 4)
  • Index Cond: (i.id = 1,498,829)
  • Buffers: shared hit=8 read=13
  • I/O Timings: read=331.504
2.          

SubPlan (for Index Scan)

3. 87.641 87.641 ↑ 1.0 1 1

Index Scan using pim_party_pk on public.pim_party (cost=0.43..8.45 rows=1 width=8) (actual time=87.638..87.641 rows=1 loops=1)

  • Output: pim_party.version
  • Index Cond: (pim_party.id = i.id)
  • Buffers: shared hit=1 read=3
  • I/O Timings: read=87.530
4. 0.013 113.876 ↑ 1.0 1 1

Limit (cost=0.43..17.10 rows=1 width=15) (actual time=113.874..113.876 rows=1 loops=1)

  • Output: pim_indiv_code.code
  • Buffers: shared hit=2 read=3
  • I/O Timings: read=113.733
5. 0.018 113.863 ↑ 1.0 1 1

Nested Loop (cost=0.43..17.10 rows=1 width=15) (actual time=113.863..113.863 rows=1 loops=1)

  • Output: pim_indiv_code.code
  • Join Filter: (pim_indiv_code.type_id = pim_code_type.id)
  • Buffers: shared hit=2 read=3
  • I/O Timings: read=113.733
6. 0.020 0.020 ↑ 1.0 1 1

Seq Scan on public.pim_code_type (cost=0.00..1.38 rows=1 width=4) (actual time=0.020..0.020 rows=1 loops=1)

  • Output: pim_code_type.id, pim_code_type.code, pim_code_type.format, pim_code_type.from_dt, pim_code_type.is_unique, pim_code_type.message_pattern, pim_code_type.name, pim_code_type.note, pim_code_type.occurrence, pim_code_type.to_dt, pim_code_type.party_type_id, pim_code_type.e_code, pim_code_type.aud_who, pim_code_type.aud_when, pim_code_type.aud_source, pim_code_type.aud_who_create, pim_code_type.aud_when_create, pim_code_type.aud_source_create
  • Filter: ((pim_code_type.code)::text = 'UID'::text)
  • Rows Removed by Filter: 7
  • Buffers: shared hit=1
7. 113.825 113.825 ↑ 3.0 1 1

Index Scan using pim_indiv_code_indiv_id_idx on public.pim_indiv_code (cost=0.43..15.69 rows=3 width=19) (actual time=113.825..113.825 rows=1 loops=1)

  • Output: pim_indiv_code.id, pim_indiv_code.code, pim_indiv_code.issue_dt, pim_indiv_code.type_id, pim_indiv_code.indiv_id, pim_indiv_code.sha256, pim_indiv_code.aud_who, pim_indiv_code.aud_when, pim_indiv_code.aud_source, pim_indiv_code.aud_who_create, pim_indiv_code.aud_when_create, pim_indiv_code.aud_source_create
  • Index Cond: (pim_indiv_code.indiv_id = i.id)
  • Buffers: shared hit=1 read=3
  • I/O Timings: read=113.733
8. 82.437 82.437 ↑ 1.0 1 1

Index Scan using pci_patient_pk on public.pci_patient p (cost=0.43..8.45 rows=1 width=4) (actual time=82.432..82.437 rows=1 loops=1)

  • Output: p.social_group_id
  • Index Cond: (p.id = i.id)
  • Buffers: shared hit=1 read=3
  • I/O Timings: read=82.338
9. 0.009 22.691 ↑ 1.0 1 1

Limit (cost=0.44..0.56 rows=1 width=4) (actual time=22.690..22.691 rows=1 loops=1)

  • Output: mc_step.admission_date
  • Buffers: shared hit=2 read=2
  • I/O Timings: read=22.614
10. 22.682 22.682 ↑ 78.0 1 1

Index Only Scan using mc_step_patient_id_admission_date_desc_ix on public.mc_step (cost=0.44..9.80 rows=78 width=4) (actual time=22.682..22.682 rows=1 loops=1)

  • Output: mc_step.admission_date
  • Index Cond: (mc_step._patient_id = i.id)
  • Heap Fetches: 0
  • Buffers: shared hit=2 read=2
  • I/O Timings: read=22.614
Planning time : 1.241 ms
Execution time : 332.243 ms