explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ot2P

Settings
# exclusive inclusive rows x rows loops node
1. 16.270 171,313.567 ↓ 25,755.0 25,755 1

Nested Loop (cost=0.99..14,097.27 rows=1 width=56) (actual time=0.166..171,313.567 rows=25,755 loops=1)

2. 6.086 6.086 ↓ 2.9 49 1

Index Scan using patient_registration_mr_no_index on patient_registration pr (cost=0.43..54.37 rows=17 width=20) (actual time=0.054..6.086 rows=49 loops=1)

  • Index Cond: ((mr_no)::text = 'UA1300000016689'::text)
3. 4,197.049 171,291.211 ↓ 526.0 526 49

Index Scan using visit_vitals_patientid_idx on visit_vitals vv (cost=0.56..826.04 rows=1 width=52) (actual time=23.588..3,495.739 rows=526 loops=49)

  • Index Cond: ((patient_id)::text = (pr.patient_id)::text)
  • Filter: (((patient_id)::text = (converted_from)::text) AND (SubPlan 1))
  • Rows Removed by Filter: 1
4.          

SubPlan (for Index Scan)

5. 103.250 167,094.162 ↑ 311.0 1 25,822

Hash Join (cost=3.07..22.39 rows=311 width=4) (actual time=6.471..6.471 rows=1 loops=25,822)

  • Hash Cond: (vr.param_id = vpm.param_id)
6. 166,990.874 166,990.874 ↑ 311.0 1 25,822

Index Scan using vital_reading_index on vital_reading vr (cost=0.57..19.02 rows=311 width=8) (actual time=6.467..6.467 rows=1 loops=25,822)

  • Index Cond: (vital_reading_id = vv.vital_reading_id)
7. 0.015 0.038 ↑ 1.0 57 1

Hash (cost=1.78..1.78 rows=57 width=4) (actual time=0.037..0.038 rows=57 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
8. 0.023 0.023 ↑ 1.0 57 1

Seq Scan on vital_parameter_master vpm (cost=0.00..1.78 rows=57 width=4) (actual time=0.007..0.023 rows=57 loops=1)

  • Filter: (param_container = ANY ('{V,I,O}'::bpchar[]))
Planning time : 1.034 ms
Execution time : 171,321.295 ms