explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WbCZ : 1

Settings
# exclusive inclusive rows x rows loops node
1. 0.870 6,965.147 ↓ 18.6 149 1

HashAggregate (cost=6,340.81..6,419.15 rows=8 width=7,006) (actual time=6,965.013..6,965.147 rows=149 loops=1)

  • Output: t_presc.oid, t_presc.prescid, t_presc.complexid, t_presc.executiondate, t_presc.createdate, t_presc.prescstateid, t_presc.mdocid, t_presc.updatedate, t_presc.signdate, t_presc.sotrid, t_presc.groupappointment, t_presc.cito, t_presc.accessionnumber_, t_presc.presctypeid, t_presc.isprofexpresctipe, t_presc.isfuture, t_presc.creatorid, t_presc.lpu, t_presc.referralid, t_presc.isreadonly, t_presc.peopleid, t_presc.placework, t_presc.peoplefullname, t_presc.birthday, t_presc.sex, t_presc.age, t_presc.mdocstatus, t_presc.mdoctypeid, t_presc.mdoctypename, t_presc.mdoctypesynonim, t_presc.mdocnum, t_presc.presctypename, t_presc.presctypefoldername, t_presc.sotrname, t_presc.sotrfullname, t_presc.prescstatename, t_presc.cabinetname, t_presc.ambtickstatusid, t_presc.isambtickclose, t_presc.ambtickstatusname, t_presc.visitid, t_presc.visitbegindate, t_presc.visitenddate, t_presc.insuranceid, t_presc.isperformer, t_presc.isaccess, t_presc.multisign, t_presc.paytypename, t_presc.paystatusid, t_presc.paystatusname, t_presc.phone, t_presc.ispregnancy, t_presc.insuranceinfo, t_presc.mkb10name, t_presc.profexlistid, t_presc.comment, t_presc.balance, t_presc.paramdata, t_presc.otdelname, t_presc.otdelid, t_presc.schedulecomment, t_presc.patientwaiting, t_presc.islivequeue, t_presc.inwork, t_presc.balancerest, (((COALESCE((t_presc.presctypefoldername || ' '::text), ''::text) || (t_presc.presctypename)::text) || COALESCE(((' ('::text || NULLIF((t_presc.paramdata)::text, ''::text)) || ')'::text), ''::text))), ((t_presc.profexlistid IS NOT NULL)), (CASE WHEN ((hashed SubPlan 14) OR ((t_presc.mdoctypesynonim)::text = 'STAC_VRACH_ZAKL'::text)) THEN 'амб'::text ELSE 'стац'::text END), (NULL::numeric), (CASE WHEN (pds.presc_id IS NOT NULL) THEN (pds.accession_number)::character varying ELSE t_presc.accessionnumber_ END), (CASE WHEN (pds.presc_id IS NOT NULL) THEN (pds.study_status = 3) WHEN ((t_presc.accessionnumber_ IS NOT NULL) AND (pds.presc_id IS NULL)) THEN COALESCE((SubPlan 15), false) ELSE false END), xray_referral.urgency_id, xray_referral.referal_num, (CASE WHEN (xray_referral.oid IS NOT NULL) THEN (SubPlan 16) ELSE NULL::bigint END), pinfo.black_list, pinfo.black_list_comment
  • Group Key: t_presc.oid, t_presc.prescid, t_presc.complexid, t_presc.executiondate, t_presc.createdate, t_presc.prescstateid, t_presc.mdocid, t_presc.updatedate, t_presc.signdate, t_presc.sotrid, t_presc.groupappointment, t_presc.cito, t_presc.accessionnumber_, t_presc.presctypeid, t_presc.isprofexpresctipe, t_presc.isfuture, t_presc.creatorid, t_presc.lpu, t_presc.referralid, t_presc.isreadonly, t_presc.peopleid, t_presc.placework, t_presc.peoplefullname, t_presc.birthday, t_presc.sex, t_presc.age, t_presc.mdocstatus, t_presc.mdoctypeid, t_presc.mdoctypename, t_presc.mdoctypesynonim, t_presc.mdocnum, t_presc.presctypename, t_presc.presctypefoldername, t_presc.sotrname, t_presc.sotrfullname, t_presc.prescstatename, t_presc.cabinetname, t_presc.ambtickstatusid, t_presc.isambtickclose, t_presc.ambtickstatusname, t_presc.visitid, t_presc.visitbegindate, t_presc.visitenddate, t_presc.insuranceid, t_presc.isperformer, t_presc.isaccess, t_presc.multisign, t_presc.paytypename, t_presc.paystatusid, t_presc.paystatusname, t_presc.phone, t_presc.ispregnancy, t_presc.insuranceinfo, t_presc.mkb10name, t_presc.profexlistid, t_presc.comment, t_presc.balance, t_presc.paramdata, t_presc.otdelname, t_presc.otdelid, t_presc.schedulecomment, t_presc.patientwaiting, t_presc.islivequeue, t_presc.inwork, t_presc.balancerest, ((COALESCE((t_presc.presctypefoldername || ' '::text), ''::text) || (t_presc.presctypename)::text) || COALESCE(((' ('::text || NULLIF((t_presc.paramdata)::text, ''::text)) || ')'::text), ''::text)), (t_presc.profexlistid IS NOT NULL), CASE WHEN ((hashed SubPlan 14) OR ((t_presc.mdoctypesynonim)::text = 'STAC_VRACH_ZAKL'::text)) THEN 'амб'::text ELSE 'стац'::text END, NULL::numeric, CASE WHEN (pds.presc_id IS NOT NULL) THEN (pds.accession_number)::character varying ELSE t_presc.accessionnumber_ END, CASE WHEN (pds.presc_id IS NOT NULL) THEN (pds.study_status = 3) WHEN ((t_presc.accessionnumber_ IS NOT NULL) AND (pds.presc_id IS NULL)) THEN COALESCE((SubPlan 15), false) ELSE false END, xray_referral.urgency_id, xray_referral.referal_num, CASE WHEN (xray_referral.oid IS NOT NULL) THEN (SubPlan 16) ELSE NULL::bigint END, pinfo.black_list, pinfo.black_list_comment
  • Buffers: shared hit=700839
2.          

CTE t_balance

3. 0.174 0.251 ↓ 1.0 233 1

HashAggregate (cost=7.46..10.34 rows=230 width=40) (actual time=0.209..0.251 rows=233 loops=1)

  • Output: pacc.people, sum(pacc.rest)
  • Group Key: pacc.people
  • Buffers: shared hit=4
4. 0.077 0.077 ↓ 1.0 233 1

Seq Scan on mir.pay_account pacc (cost=0.00..6.31 rows=231 width=40) (actual time=0.013..0.077 rows=233 loops=1)

  • Output: pacc.oid, pacc.rest, pacc.people
  • Buffers: shared hit=4
5.          

CTE t_presc

6. 253.051 6,951.347 ↓ 29.8 149 1

Nested Loop Left Join (cost=450.05..3,277.30 rows=5 width=1,811) (actual time=42.886..6,951.347 rows=149 loops=1)

  • Output: presc.id, presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, btrim((presc.presc_state_id)::text), presc.mdoc_id, presc.upd_dt, COALESCE(presc.upd_dt, presc.prunbeg_dt), presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, (presc.presctype_id = (cnt.cn_presctype_profex())::bpchar), (presc.prunbeg_dt > now()), presc.creator_id, presc.lpu, presc.xray_referral_id, CASE WHEN (presc.prunbeg_dt < (('now'::cstring)::date - ('630 day'::cstring)::interval)) THEN true ELSE false END, p.oid, p.placework, (((COALESCE(p.lastname, ' '::character varying))::text || COALESCE((' '::text || (p.firstname)::text), ' '::text)) || COALESCE((' '::text || (p.middlename)::text), ' '::text)), p.birthday, p.sex, mir.get_age(p.birthday, ('now'::cstring)::date, NULL::character varying), mdoc.status, mdoc.mdoc_type_id, mdoc_type.name, mdoc_type.synonim, mdoc_number.mdoc_get_num, presctype.name, CASE WHEN (presctype.visible = 1::numeric) THEN (' '::text || (ptf.name)::text) ELSE ''::text END, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), (((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text))) || COALESCE(((' ('::text || (create_sotr_post.name)::text) || ')'::text), ''::text)), pst.name, COALESCE(cab.cabinet_name, cab_sch.cabinet_name, 'Не указан'::character varying), amt.status_id, ((amt.status_id)::bpchar = 'close'::bpchar), amts.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, ((COALESCE(sotr.oid, ''::bpchar) = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar) AND (COALESCE(presc.lpu, ''::bpchar) = 'c22e67eb-8d77-4c4a-a592-8d0f3ab44c39'::bpchar)), CASE WHEN (((presc.presc_state_id)::text = ANY ('{sign,progress}'::text[])) AND (presc.runemp_id = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar)) THEN true WHEN (((presc.presc_state_id)::bpchar = 'not_done'::bpchar) AND (sotr_presctype.oid IS NOT NULL)) THEN true ELSE false END, sotr_presctype.multisign, pay_type.name, presc_info.pay_status, COALESCE(pay_status.name, 'Не оплачено'::character varying), concat_ws(', '::text, p.telsot1, p.telsot2, p.telhome, p.telwork), COALESCE(CASE WHEN (p.sex = 1::numeric) THEN (SubPlan 2) ELSE false END, false), mir.insurance_get_pay_type_info(visit.idoc_id), COALESCE(mir.get_diag_main_text((visit.id)::character varying), mir.get_diag_preliminary_text((visit.id)::character varying)), (SubPlan 3), (SubPlan 4), CASE WHEN (t_balance.debt <> 0::numeric) THEN t_balance.debt ELSE NULL::numeric END, mir.presctypeparam_get_values(presc.id, 'PARAMETR'::character varying, false), CASE WHEN ((hashed SubPlan 5) OR ((mdoc_type.synonim)::text = 'STAC_VRACH_ZAKL'::text)) THEN ((SubPlan 6))::text ELSE (SubPlan 7) END, CASE WHEN ((hashed SubPlan 8) OR ((mdoc_type.synonim)::text = 'STAC_VRACH_ZAKL'::text)) THEN (SubPlan 9) ELSE (SubPlan 10) END, pr_sch.commentary, pr_sch.waiting, COALESCE((sch.starton = sch.endon), false), presc.in_work, ins_b.rest
  • Join Filter: ((visit.pay_type_id)::text = 'dms'::text)
  • Buffers: shared hit=698986
7.          

Initplan (for Nested Loop Left Join)

8. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_sotr_right on auth.sotr_right (cost=0.28..4.30 rows=1 width=0) (never executed)

  • Index Cond: ((sotr_right.sotr = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar) AND (sotr_right.rights = 'all_not_done_presc_in_presc_list'::text))
  • Heap Fetches: 0
9. 0.360 107.189 ↓ 29.8 149 1

Nested Loop Left Join (cost=429.99..2,868.28 rows=5 width=1,786) (actual time=12.147..107.189 rows=149 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, pay_type.name, t_balance.debt, pr_sch.commentary, pr_sch.waiting, sch.starton, sch.endon, cab.cabinet_name, cab_sch.cabinet_name, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=15091
10. 0.450 106.829 ↓ 29.8 149 1

Nested Loop Left Join (cost=429.72..2,866.80 rows=5 width=1,818) (actual time=12.145..106.829 rows=149 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, pay_type.name, t_balance.debt, pr_sch.commentary, pr_sch.waiting, sch.starton, sch.endon, sch.cabinet, cab.cabinet_name, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=15091
11. 2.280 106.379 ↓ 29.8 149 1

Nested Loop Left Join (cost=429.46..2,865.17 rows=5 width=1,850) (actual time=12.143..106.379 rows=149 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, pay_type.name, t_balance.debt, pr_sch.commentary, pr_sch.waiting, sch.starton, sch.endon, sch.cabinet, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Join Filter: ((sc.cabinet)::bpchar = sch.cabinet)
  • Rows Removed by Join Filter: 10045
  • Filter: ((presc.runemp_id = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar) OR (((sc.sotr)::text = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::text) AND ((presc.runemp_id = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar) OR (presc.runemp_id IS NULL))) OR (((presc.presc_state_id)::text = ANY ('{not_done,absence,done_lab}'::text[])) AND (presc.runemp_id IS NULL) AND (sc.sotr IS NULL)) OR (((presc.presc_state_id)::text = ANY ('{not_done,absence,done_lab}'::text[])) AND $13 AND (COALESCE(presc.runemp_id, ''::bpchar) <> '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar)) OR (sotr_presctype.multisign AND (presc_sign_sotr.oid IS NOT NULL)))
  • Rows Removed by Filter: 96
  • Buffers: shared hit=15091
12. 0.609 103.364 ↓ 22.3 245 1

Nested Loop Left Join (cost=429.46..2,800.82 rows=11 width=1,998) (actual time=11.975..103.364 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, presc_sign_sotr.oid, pay_type.name, t_balance.debt, pr_sch.commentary, pr_sch.waiting, sch.starton, sch.endon, sch.cabinet, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=15042
13. 0.621 102.755 ↓ 22.3 245 1

Nested Loop Left Join (cost=429.04..2,787.29 rows=11 width=1,982) (actual time=11.973..102.755 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, presc_sign_sotr.oid, pay_type.name, t_balance.debt, pr_sch.commentary, pr_sch.waiting, pr_sch.shedule_id, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=15042
14. 0.504 98.214 ↓ 22.3 245 1

Hash Left Join (cost=428.76..2,776.15 rows=11 width=1,919) (actual time=11.942..98.214 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, presc_sign_sotr.oid, pay_type.name, t_balance.debt, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Hash Cond: (mdoc.people_id = t_balance.people)
  • Buffers: shared hit=14549
15. 0.486 97.338 ↓ 22.3 245 1

Hash Left Join (cost=421.28..2,768.32 rows=11 width=1,887) (actual time=11.562..97.338 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, presc_sign_sotr.oid, pay_type.name, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Hash Cond: ((visit.pay_type_id)::text = (pay_type.oid)::text)
  • Buffers: shared hit=14545
16. 0.496 96.845 ↓ 22.3 245 1

Nested Loop Left Join (cost=420.06..2,766.94 rows=11 width=1,864) (actual time=11.548..96.845 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, presc_sign_sotr.oid, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=14544
17. 0.541 95.859 ↓ 22.3 245 1

Hash Left Join (cost=419.91..2,764.86 rows=11 width=1,716) (actual time=11.544..95.859 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, amts.name, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Hash Cond: ((amt.status_id)::text = (amts.id)::text)
  • Buffers: shared hit=14299
18. 0.614 95.315 ↓ 22.3 245 1

Nested Loop Left Join (cost=418.87..2,763.66 rows=11 width=1,703) (actual time=11.536..95.315 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, amt.status_id, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=14298
19. 0.474 89.066 ↓ 22.3 245 1

Nested Loop Left Join (cost=418.45..2,757.20 rows=11 width=1,698) (actual time=11.498..89.066 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, visit.id, visit.beginv, visit.endv, visit.idoc_id, visit.pay_type_id, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=13313
20. 0.423 82.957 ↓ 22.3 245 1

Nested Loop Left Join (cost=418.04..2,741.76 rows=11 width=1,646) (actual time=11.459..82.957 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr_post.name, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))), ((((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=12332
21. 0.454 77.634 ↓ 22.3 245 1

Nested Loop Left Join (cost=417.62..2,651.38 rows=11 width=1,651) (actual time=11.382..77.634 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr.sysuser, create_sotr_post.name, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=11348
22. 0.422 74.975 ↓ 22.3 245 1

Nested Loop Left Join (cost=417.35..2,643.89 rows=11 width=1,637) (actual time=11.362..74.975 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, create_sotr.otdel, create_sotr.post, create_sotr.sysuser, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=10613
23. 0.389 72.838 ↓ 22.3 245 1

Nested Loop Left Join (cost=417.21..2,641.94 rows=11 width=1,526) (actual time=11.354..72.838 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, ((((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text)))
  • Buffers: shared hit=10123
24. 0.542 69.509 ↓ 22.3 245 1

Nested Loop Left Join (cost=416.79..2,551.56 rows=11 width=1,531) (actual time=11.352..69.509 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name, sotr.oid, sotr.sysuser
  • Buffers: shared hit=9492
25. 0.337 67.987 ↓ 22.3 245 1

Hash Left Join (cost=416.65..2,549.62 rows=11 width=1,457) (actual time=11.350..67.987 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status, pay_status.name
  • Hash Cond: ((presc_info.pay_status)::text = (pay_status.oid)::text)
  • Buffers: shared hit=9204
26. 0.444 67.644 ↓ 22.3 245 1

Nested Loop Left Join (cost=415.51..2,548.33 rows=11 width=1,434) (actual time=11.336..67.644 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num, presc_info.pay_status
  • Buffers: shared hit=9203
27. 0.751 64.015 ↓ 22.3 245 1

Nested Loop Left Join (cost=415.23..2,543.27 rows=11 width=1,432) (actual time=11.320..64.015 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, mdoc_number.mdoc_get_num
  • Buffers: shared hit=8709
28. 0.600 58.609 ↓ 22.3 245 1

Hash Join (cost=414.95..2,538.63 rows=11 width=1,465) (actual time=11.285..58.609 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, mdoc.id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, pst.name, ptf.name, sotr_presctype.oid, sotr_presctype.multisign
  • Hash Cond: ((presc.presc_state_id)::text = (pst.id)::text)
  • Buffers: shared hit=7974
29. 0.745 58.001 ↓ 22.3 245 1

Nested Loop (cost=413.77..2,537.30 rows=11 width=1,445) (actual time=11.267..58.001 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, mdoc.id, p.oid, p.placework, p.lastname, p.firstname, p.middlename, p.birthday, p.sex, p.telsot1, p.telsot2, p.telhome, p.telwork, mdoc_type.name, mdoc_type.synonim, ptf.name, sotr_presctype.oid, sotr_presctype.multisign
  • Buffers: shared hit=7973
30. 0.986 49.906 ↓ 22.3 245 1

Hash Join (cost=413.35..2,521.43 rows=11 width=1,052) (actual time=11.180..49.906 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, mdoc.id, mdoc_type.name, mdoc_type.synonim, ptf.name, sotr_presctype.oid, sotr_presctype.multisign
  • Hash Cond: (mdoc.mdoc_type_id = mdoc_type.id)
  • Join Filter: ((hashed SubPlan 12) OR ((mdoc_type.synonim)::text = 'STAC_VRACH_ZAKL'::text))
  • Buffers: shared hit=6991
31. 0.592 48.435 ↓ 12.2 245 1

Nested Loop (cost=404.23..2,511.94 rows=20 width=996) (actual time=10.671..48.435 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, mdoc.status, mdoc.mdoc_type_id, mdoc.people_id, mdoc.id, ptf.name, sotr_presctype.oid, sotr_presctype.multisign
  • Buffers: shared hit=6966
32. 0.264 42.208 ↓ 12.2 245 1

Nested Loop (cost=403.95..2,491.23 rows=20 width=881) (actual time=10.624..42.208 rows=245 loops=1)

  • Output: presc.id, presc.complex_id, presc.prunbeg_dt, presc.create_dt, presc.presc_state_id, presc.mdoc_id, presc.upd_dt, presc.runemp_id, presc.group_appointment, presc.cito, presc.accessionnumber, presc.presctype_id, presc.creator_id, presc.lpu, presc.xray_referral_id, presc.in_work, presc.visit_id, presc.cabinet_id, presctype.name, presctype.visible, ptf.name, sotr_presctype.oid, sotr_presctype.multisign
  • Buffers: shared hit=6231
33. 0.008 1.926 ↑ 4.0 2 1

Nested Loop (cost=383.87..662.48 rows=8 width=234) (actual time=1.876..1.926 rows=2 loops=1)

  • Output: presctype.name, presctype.visible, presctype.oid, ptf.name, sotr_presctype.oid, sotr_presctype.multisign, sotr_presctype.presctype
  • Buffers: shared hit=152
34. 0.016 1.900 ↑ 4.0 2 1

Hash Join (cost=383.73..660.04 rows=8 width=234) (actual time=1.863..1.900 rows=2 loops=1)

  • Output: presctype.name, presctype.visible, presctype.oid, presctype.presctypefolder_id, sotr_presctype.oid, sotr_presctype.multisign, sotr_presctype.presctype
  • Hash Cond: (sotr_presctype.presctype = presctype.oid)
  • Buffers: shared hit=148
35. 0.044 1.200 ↑ 3.5 22 1

Bitmap Heap Scan on auth.sotr_presctype (cost=299.02..574.96 rows=78 width=75) (actual time=1.171..1.200 rows=22 loops=1)

  • Output: sotr_presctype.oid, sotr_presctype.sotr, sotr_presctype.presctype, sotr_presctype.appoint, sotr_presctype.execute, sotr_presctype.multisign, sotr_presctype.show_schedule, sotr_presctype.appoint_custom, sotr_presctype.execute_custom, sotr_presctype.appoint_other, sotr_presctype.execute_other, sotr_presctype.multisign_custom, sotr_presctype.show_schedule_custom
  • Recheck Cond: ((sotr_presctype.sotr = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar) AND (sotr_presctype.execute = 1))
  • Filter: (sotr_presctype.oid IS NOT NULL)
  • Heap Blocks: exact=4
  • Buffers: shared hit=78
36. 0.012 1.156 ↓ 0.0 0 1

BitmapAnd (cost=299.02..299.02 rows=78 width=0) (actual time=1.156..1.156 rows=0 loops=1)

  • Buffers: shared hit=74
37. 0.288 0.288 ↓ 1.0 1,113 1

Bitmap Index Scan on ix_fk_sotr_presctype_sotr (cost=0.00..96.65 rows=1,098 width=0) (actual time=0.288..0.288 rows=1,113 loops=1)

  • Index Cond: (sotr_presctype.sotr = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar)
  • Buffers: shared hit=15
38. 0.856 0.856 ↓ 1.0 5,035 1

Bitmap Index Scan on ix_show_exe_presctype_idx (cost=0.00..202.08 rows=5,022 width=0) (actual time=0.856..0.856 rows=5,035 loops=1)

  • Index Cond: (sotr_presctype.execute = 1)
  • Buffers: shared hit=59
39. 0.048 0.684 ↑ 1.0 119 1

Hash (cost=83.22..83.22 rows=119 width=159) (actual time=0.684..0.684 rows=119 loops=1)

  • Output: presctype.name, presctype.visible, presctype.oid, presctype.presctypefolder_id
  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
  • Buffers: shared hit=70
40. 0.636 0.636 ↑ 1.0 119 1

Seq Scan on mir.presctype (cost=0.00..83.22 rows=119 width=159) (actual time=0.023..0.636 rows=119 loops=1)

  • Output: presctype.name, presctype.visible, presctype.oid, presctype.presctypefolder_id
  • Filter: ((presctype.presctypefolderid_parent)::text = ANY ('{ec8c388e-ca13-4cd2-a7ef-86c377658123}'::text[]))
  • Rows Removed by Filter: 1056
  • Buffers: shared hit=70
41. 0.018 0.018 ↑ 1.0 1 2

Index Scan using pk_presctypefolder on mir.presctypefolder ptf (cost=0.14..0.29 rows=1 width=72) (actual time=0.007..0.009 rows=1 loops=2)

  • Output: ptf.id, ptf.parent_id, ptf.name, ptf.del, ptf."order", ptf.foms_code
  • Index Cond: ((ptf.id)::text = (presctype.presctypefolder_id)::text)
  • Buffers: shared hit=4
42. 36.626 40.018 ↓ 20.5 123 2

Bitmap Heap Scan on mir.presc (cost=20.08..228.53 rows=6 width=721) (actual time=7.197..20.009 rows=123 loops=2)

  • Output: presc.id, presc.presctype_id, presc.visit_id, presc.create_dt, presc.prunbeg_dt, presc.mdoc_id, presc.presc_state_id, presc.cabinet_id, presc.runemp_id, presc.creator_id, presc.presc_time_id, presc.parent_id, presc.upd_dt, presc.order_num, presc.order_add, presc.appendix_id, presc.lab_searching, presc.xray_referral_id, presc.reason, presc.attendance, presc.lpu, presc.show_prunbeg_dt, presc.additional, presc.auto_sign, presc.cito, presc.group_appointment, presc.accessionnumber, presc.model, presc.common_presc_id, presc.printable, presc.sysdate, presc.referral_doctor, presc.complex_id, presc.in_work, presc.is_reuse
  • Recheck Cond: (presc.presctype_id = presctype.oid)
  • Filter: ((presc.lpu = 'c22e67eb-8d77-4c4a-a592-8d0f3ab44c39'::bpchar) AND (((presc.upd_dt >= '2020-02-03 00:00:00'::timestamp without time zone) AND (presc.upd_dt < '2020-02-04 00:00:00'::timestamp without time zone) AND (presc.upd_dt IS NOT NULL)) OR ((presc.prunbeg_dt >= '2020-02-03 00:00:00'::timestamp without time zone) AND (presc.prunbeg_dt < '2020-02-04 00:00:00'::timestamp without time zone) AND (presc.upd_dt IS NULL) AND (presc.prunbeg_dt IS NOT NULL))))
  • Rows Removed by Filter: 3755
  • Heap Blocks: exact=5935
  • Buffers: shared hit=6079
43. 3.392 3.392 ↓ 13.4 3,945 2

Bitmap Index Scan on ix_fk_presc_presctype (cost=0.00..20.08 rows=295 width=0) (actual time=1.696..1.696 rows=3,945 loops=2)

  • Index Cond: (presc.presctype_id = presctype.oid)
  • Buffers: shared hit=144
44. 5.635 5.635 ↑ 1.0 1 245

Index Scan using pk_mdoc on mir.mdoc (cost=0.29..1.03 rows=1 width=115) (actual time=0.021..0.023 rows=1 loops=245)

  • Output: mdoc.id, mdoc.people_id, mdoc.mdoc_type_id, mdoc.beginm, mdoc.endm, mdoc.num, mdoc.pdoc_id, mdoc.status, mdoc.year, mdoc.otdel, mdoc.lpu, mdoc.docobsl_id, mdoc.location, mdoc.reason_archive_id
  • Index Cond: (mdoc.id = presc.mdoc_id)
  • Buffers: shared hit=735
45. 0.005 0.010 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=93) (actual time=0.010..0.010 rows=16 loops=1)

  • Output: mdoc_type.name, mdoc_type.synonim, mdoc_type.id
  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
  • Buffers: shared hit=1
46. 0.005 0.005 ↑ 1.0 16 1

Seq Scan on mir.mdoc_type (cost=0.00..1.16 rows=16 width=93) (actual time=0.002..0.005 rows=16 loops=1)

  • Output: mdoc_type.name, mdoc_type.synonim, mdoc_type.id
  • Buffers: shared hit=1
47.          

SubPlan (for Hash Join)

48. 0.475 0.475 ↑ 166.7 6 1

Result (cost=0.00..5.25 rows=1,000 width=0) (actual time=0.473..0.475 rows=6 loops=1)

  • Output: mir.mdoc_type_ambul_list()
  • Buffers: shared hit=24
49. 7.350 7.350 ↑ 1.0 1 245

Index Scan using pk_people on mir.people p (cost=0.42..1.43 rows=1 width=393) (actual time=0.029..0.030 rows=1 loops=245)

  • Output: p.oid, p.dtcreation, p.id, p.sex, p.livein, p.sstate, p.pacient, p.addressex1, p.addressex2, p.lpu, p.email, p.telhome, p.telwork, p.telsot1, p.telsot2, p.district, p.company, p.peopledoctype, p.peopledocser, p.peopledocnum, p.dispuchet, p.profession, p.peoplepost, p.dependant, p.webmail, p.webphone, p.region, p.category, p.placework, p.firstname, p.lastname, p.middlename, p.birthday, p.login, p.waslogin, p.password, p.deathdate, p.gasurf_oid, p.phonecode, p.karta, p.importcode, p.sysdate, p.description, p.snils2, p.snils, p.issuedate, p.issuedby, p.enddate, p.peopledocdepcode, p.birthplace, p.enp
  • Index Cond: (p.oid = mdoc.people_id)
  • Buffers: shared hit=982
50. 0.005 0.008 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=27) (actual time=0.008..0.008 rows=8 loops=1)

  • Output: pst.name, pst.id
  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • Buffers: shared hit=1
51. 0.003 0.003 ↑ 1.0 8 1

Seq Scan on mir.presc_state pst (cost=0.00..1.08 rows=8 width=27) (actual time=0.003..0.003 rows=8 loops=1)

  • Output: pst.name, pst.id
  • Buffers: shared hit=1
52. 4.655 4.655 ↑ 1.0 1 245

Index Scan using pk_mdoc_number on mir.mdoc_number (cost=0.29..0.41 rows=1 width=41) (actual time=0.018..0.019 rows=1 loops=245)

  • Output: mdoc_number.mdoc_id, mdoc_number.num, mdoc_number.year, mdoc_number.date_generate, mdoc_number.mdoc_type_id, mdoc_number.prefix, mdoc_number.approved, mdoc_number.date_approved, mdoc_number.mdoc_get_num
  • Index Cond: (mdoc_number.mdoc_id = mdoc.id)
  • Buffers: shared hit=735
53. 3.185 3.185 ↓ 0.0 0 245

Index Scan using presc_info_pkey on mir.presc_info (cost=0.28..0.45 rows=1 width=39) (actual time=0.013..0.013 rows=0 loops=245)

  • Output: presc_info.oid, presc_info.pay_status, presc_info.paid, presc_info.visit_reason, presc_info.profile_care, presc_info.presc_conclusion
  • Index Cond: (presc_info.oid = presc.id)
  • Buffers: shared hit=494
54. 0.003 0.006 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=25) (actual time=0.006..0.006 rows=6 loops=1)

  • Output: pay_status.name, pay_status.oid
  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • Buffers: shared hit=1
55. 0.003 0.003 ↑ 1.0 6 1

Seq Scan on mir.pay_status (cost=0.00..1.06 rows=6 width=25) (actual time=0.002..0.003 rows=6 loops=1)

  • Output: pay_status.name, pay_status.oid
  • Buffers: shared hit=1
56. 0.980 0.980 ↑ 1.0 1 245

Index Scan using pk_sotr on mir.sotr (cost=0.14..0.17 rows=1 width=74) (actual time=0.004..0.004 rows=1 loops=245)

  • Output: sotr.oid, sotr.sysuser, sotr.otdel, sotr.post, sotr.district, sotr.date_post_begin, sotr.date_post_end, sotr.id, sotr.sysdate
  • Index Cond: (sotr.oid = presc.runemp_id)
  • Buffers: shared hit=288
57. 2.940 2.940 ↑ 1.0 1 245

Index Scan using pk_people on mir.people p_1 (cost=0.42..8.21 rows=1 width=69) (actual time=0.011..0.012 rows=1 loops=245)

  • Output: p_1.oid, (((COALESCE(p_1.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_1.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_1.middlename)::text, 1, 1)) || '.'::text), ' '::text))
  • Index Cond: (p_1.oid = sotr.sysuser)
  • Buffers: shared hit=631
58. 1.715 1.715 ↑ 1.0 1 245

Index Scan using pk_sotr on mir.sotr create_sotr (cost=0.14..0.17 rows=1 width=148) (actual time=0.006..0.007 rows=1 loops=245)

  • Output: create_sotr.oid, create_sotr.sysuser, create_sotr.otdel, create_sotr.post, create_sotr.district, create_sotr.date_post_begin, create_sotr.date_post_end, create_sotr.id, create_sotr.sysdate
  • Index Cond: (create_sotr.oid = presc.creator_id)
  • Buffers: shared hit=490
59. 2.205 2.205 ↑ 1.0 1 245

Index Scan using pk_post on mir.post create_sotr_post (cost=0.27..0.67 rows=1 width=88) (actual time=0.008..0.009 rows=1 loops=245)

  • Output: create_sotr_post.oid, create_sotr_post.name, create_sotr_post.parent, create_sotr_post.id, create_sotr_post.version, create_sotr_post.isuniqueforlpu, create_sotr_post.name2, create_sotr_post.show, create_sotr_post.status, create_sotr_post.is_doctor, create_sotr_post.short_name, create_sotr_post.name_genitiv
  • Index Cond: (create_sotr_post.oid = create_sotr.post)
  • Buffers: shared hit=735
60. 4.900 4.900 ↑ 1.0 1 245

Index Scan using pk_people on mir.people p_2 (cost=0.42..8.21 rows=1 width=69) (actual time=0.018..0.020 rows=1 loops=245)

  • Output: p_2.oid, (((COALESCE(p_2.lastname, ' '::character varying))::text || COALESCE(((' '::text || substr((p_2.firstname)::text, 1, 1)) || '.'::text), ' '::text)) || COALESCE(((' '::text || substr((p_2.middlename)::text, 1, 1)) || '.'::text), ' '::text))
  • Index Cond: (p_2.oid = create_sotr.sysuser)
  • Buffers: shared hit=984
61. 5.635 5.635 ↑ 1.0 1 245

Index Scan using pk_visit on mir.visit (cost=0.41..1.39 rows=1 width=89) (actual time=0.021..0.023 rows=1 loops=245)

  • Output: visit.id, visit.beginv, visit.endv, visit.mdoc_id, visit.pay_type_id, visit.addr_id, visit.visit_state, visit.sotr_id, visit.pay_method, visit.parent, visit.idoc_id
  • Index Cond: (visit.id = presc.visit_id)
  • Buffers: shared hit=981
62. 5.635 5.635 ↑ 1.0 1 245

Index Scan using pk_ambticket on mir.ambticket amt (cost=0.41..0.58 rows=1 width=42) (actual time=0.021..0.023 rows=1 loops=245)

  • Output: amt.id, amt.empo_id, amt.empc_id, amt.servplace_id, amt.goal_id, amt.travm_id, amt.idoc_id, amt.result_id, amt.empcancel_id, amt.cancel_date, amt.status_id, amt.travm_date, amt.dispstate_id, amt.subresult_id, amt.otdel, amt.sysdate, amt.course, amt.child_number, amt.medicalcare, amt.export_foms, amt.medicalcare_form, amt.people_relation, amt.field_work, amt.primary_care_organization, amt.disp_refusal_is_all, amt.export_foms_comment, amt.visit_reason, amt.is_selfarrival, amt.date_of_last_sign_presc, amt.visit_kind, amt.external_causes
  • Index Cond: (amt.id = visit.id)
  • Buffers: shared hit=985
63. 0.001 0.003 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=18) (actual time=0.003..0.003 rows=2 loops=1)

  • Output: amts.name, amts.id
  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • Buffers: shared hit=1
64. 0.002 0.002 ↑ 1.0 2 1

Seq Scan on mir.ambtick_status amts (cost=0.00..1.02 rows=2 width=18) (actual time=0.002..0.002 rows=2 loops=1)

  • Output: amts.name, amts.id
  • Buffers: shared hit=1
65. 0.490 0.490 ↓ 0.0 0 245

Index Scan using "ix_fk_presc_sign_sotr$presc" on mir.presc_sign_sotr (cost=0.14..0.18 rows=1 width=296) (actual time=0.002..0.002 rows=0 loops=245)

  • Output: presc_sign_sotr.presc, presc_sign_sotr.sotr, presc_sign_sotr.oid, presc_sign_sotr.sign_date
  • Index Cond: (presc_sign_sotr.presc = presc.id)
  • Filter: (presc_sign_sotr.sotr = '7a4f8efa-8e3e-4ff4-9709-987aa094c58a'::bpchar)
  • Buffers: shared hit=245
66. 0.005 0.007 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=32) (actual time=0.007..0.007 rows=10 loops=1)

  • Output: pay_type.name, pay_type.oid
  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • Buffers: shared hit=1
67. 0.002 0.002 ↑ 1.0 10 1

Seq Scan on mir.pay_type (cost=0.00..1.10 rows=10 width=32) (actual time=0.002..0.002 rows=10 loops=1)

  • Output: pay_type.name, pay_type.oid
  • Buffers: shared hit=1
68. 0.051 0.372 ↓ 1.0 232 1

Hash (cost=4.60..4.60 rows=230 width=180) (actual time=0.372..0.372 rows=232 loops=1)

  • Output: t_balance.debt, t_balance.people
  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
  • Buffers: shared hit=4
69. 0.321 0.321 ↓ 1.0 233 1

CTE Scan on t_balance (cost=0.00..4.60 rows=230 width=180) (actual time=0.211..0.321 rows=233 loops=1)

  • Output: t_balance.debt, t_balance.people
  • Buffers: shared hit=4
70. 3.920 3.920 ↓ 0.0 0 245

Index Scan using presc_schedule_idx_presc on mir.presc_schedule pr_sch (cost=0.29..1.00 rows=1 width=100) (actual time=0.016..0.016 rows=0 loops=245)

  • Output: pr_sch.id, pr_sch.presc_id, pr_sch.shedule_id, pr_sch.presctype, pr_sch.people, pr_sch.mdoc, pr_sch.register_date, pr_sch.register_num, pr_sch.presc_state_id, pr_sch.waiting, pr_sch.commentary
  • Index Cond: (pr_sch.presc_id = presc.id)
  • Buffers: shared hit=493
71. 0.000 0.000 ↓ 0.0 0 245

Index Scan using pk_schedule on mir.schedule sch (cost=0.41..1.22 rows=1 width=90) (actual time=0.000..0.000 rows=0 loops=245)

  • Output: sch.oid, sch.cabinet, sch.insite, sch.sysuser, sch.presctype, sch.people, sch.state, sch.isnapronly, sch.ticketnumber, sch.lpu, sch.isbron, sch.schedulecallstate, sch.schedulecallstatecomment, sch.updatepeopledate, sch.peoplescheduleplace, sch.schedulecallstatedate, sch.schedulecallstatesysuser, sch.extralinereason, sch.info, sch.yavkadt, sch.sysuseraddpeople, sch.paid, sch.starton, sch.endon, sch.otdel, sch.recorddatetime, sch.recordoperator, sch.blockdatetime, sch.blockoperator, sch.sotr, sch.maxvisitors, sch.financingtype, sch.napr_num, sch.sync, sch.equipment_id, sch.parent_id, sch.islocked, sch.onboard, sch.sms_ids
  • Index Cond: (sch.oid = pr_sch.shedule_id)
72. 0.592 0.735 ↑ 1.0 41 245

Materialize (cost=0.00..49.79 rows=41 width=74) (actual time=0.001..0.003 rows=41 loops=245)

  • Output: sc.cabinet, sc.sotr
  • Buffers: shared hit=49
73. 0.143 0.143 ↑ 1.0 41 1

Seq Scan on mir.sotr_cabinet sc (cost=0.00..49.59 rows=41 width=74) (actual time=0.014..0.143 rows=41 loops=1)

  • Output: sc.cabinet, sc.sotr
  • Filter: (sc.del = 0::numeric)
  • Rows Removed by Filter: 6
  • Buffers: shared hit=49
74. 0.000 0.000 ↓ 0.0 0 149

Index Scan using pk_cabinet on mir.cabinet cab (cost=0.27..0.32 rows=1 width=42) (actual time=0.000..0.000 rows=0 loops=149)

  • Output: cab.oid, cab.otdel, cab.building, cab.cabinet_name, cab.phone, cab.synonym
  • Index Cond: (cab.oid = presc.cabinet_id)
75. 0.000 0.000 ↓ 0.0 0 149

Index Scan using pk_cabinet on mir.cabinet cab_sch (cost=0.27..0.28 rows=1 width=42) (actual time=0.000..0.000 rows=0 loops=149)

  • Output: cab_sch.oid, cab_sch.otdel, cab_sch.building, cab_sch.cabinet_name, cab_sch.phone, cab_sch.synonym
  • Index Cond: (cab_sch.oid = sch.cabinet)
76. 6,580.734 6,580.734 ↓ 0.0 0 149

Function Scan on mir.get_insurance_balance ins_b (cost=0.25..12.75 rows=5 width=64) (actual time=44.166..44.166 rows=0 loops=149)

  • Output: ins_b.oid, ins_b.insurance, ins_b.ins_paid, ins_b.presc_paid, ins_b.rest
  • Function Call: mir.get_insurance_balance(NULL::character varying, (visit.idoc_id)::character varying)
  • Filter: ((ins_b.insurance)::bpchar = visit.idoc_id)
  • Buffers: shared hit=673618
77.          

SubPlan (for Nested Loop Left Join)

78. 0.126 0.126 ↓ 0.0 0 21

Index Scan using idx_pregnancy_control_people on mir.pregnancy_control c (cost=0.14..8.16 rows=1 width=0) (actual time=0.006..0.006 rows=0 loops=21)

  • Output: true
  • Index Cond: (c.people = mdoc.people_id)
  • Filter: (c.state = 0::numeric)
  • Buffers: shared hit=21
79. 0.745 6.854 ↑ 1.0 1 149

Aggregate (cost=8.44..8.45 rows=1 width=37) (actual time=0.046..0.046 rows=1 loops=149)

  • Output: max(pln.profex_list)
  • Buffers: shared hit=597
80. 6.109 6.109 ↑ 1.0 1 149

Index Scan using ix_fk_profex_list_naz_presc on mir.profex_list_naz pln (cost=0.42..8.44 rows=1 width=37) (actual time=0.041..0.041 rows=1 loops=149)

  • Output: pln.oid, pln.profex_list, pln.presc, pln.presc_type, pln.exec_sotr, pln.naztype, pln.result, pln.group_health, pln.conclusion, pln.profex_conclusion, pln.recommends, pln.num_protocol, pln.date_protocol, pln.conclusion_protocol, pln.presctype_parent, pln.parent
  • Index Cond: (pln.presc = presc.id)
  • Buffers: shared hit=597
81. 0.298 1.341 ↓ 0.0 0 149

Limit (cost=8.17..8.18 rows=1 width=40) (actual time=0.009..0.009 rows=0 loops=149)

  • Output: cp.text_comment, cp.create_dt
  • Buffers: shared hit=149
82. 0.596 1.043 ↓ 0.0 0 149

Sort (cost=8.17..8.18 rows=1 width=40) (actual time=0.007..0.007 rows=0 loops=149)

  • Output: cp.text_comment, cp.create_dt
  • Sort Key: cp.create_dt
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=149
83. 0.447 0.447 ↓ 0.0 0 149

Index Scan using ix_comment_people_people on mir.comment_people cp (cost=0.14..8.16 rows=1 width=40) (actual time=0.003..0.003 rows=0 loops=149)

  • Output: cp.text_comment, cp.create_dt
  • Index Cond: (cp.people = p.oid)
  • Buffers: shared hit=149
84. 0.052 0.052 ↑ 166.7 6 1

Result (cost=0.00..5.25 rows=1,000 width=0) (actual time=0.051..0.052 rows=6 loops=1)

  • Output: mir.mdoc_type_ambul_list()
  • Buffers: shared hit=1
85. 1.341 1.341 ↑ 1.0 1 149

Seq Scan on mir.otdel o (cost=0.00..3.16 rows=1 width=69) (actual time=0.007..0.009 rows=1 loops=149)

  • Output: COALESCE(o.name, ''::character varying)
  • Filter: (o.oid = create_sotr.otdel)
  • Rows Removed by Filter: 12
  • Buffers: shared hit=447
86. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.57..20.77 rows=1 width=585) (never executed)

  • Output: (((COALESCE(o_1.name, ''::character varying))::text || COALESCE(((' ('::text || (room.room_name)::text) || ')'::text), ''::text)))
87. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.57..20.77 rows=1 width=585) (never executed)

  • Output: ((COALESCE(o_1.name, ''::character varying))::text || COALESCE(((' ('::text || (room.room_name)::text) || ')'::text), ''::text))
88. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.43..20.31 rows=1 width=217) (never executed)

  • Output: o_1.name, bed.room
89. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.29..19.88 rows=1 width=217) (never executed)

  • Output: o_1.name, hmb.bed
90. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.14..11.70 rows=1 width=217) (never executed)

  • Output: prs.oid, o_1.name
  • Join Filter: (prs.otdel = o_1.oid)
91. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_fk_hospital_move_mdoc on hosp.hospital_move prs (cost=0.14..8.41 rows=1 width=296) (never executed)

  • Output: prs.oid, prs.mdoc, prs.otdel, prs.bed_profile, prs.data_begin, prs.data_end, prs.documents_service, prs.doctor, prs.count_place, prs.planing, prs.create_date
  • Index Cond: (prs.mdoc = presc.mdoc_id)
  • Filter: (prs.oid = hosp.peresel_get_max_peresel_id(prs.mdoc))
92. 0.000 0.000 ↓ 0.0 0

Seq Scan on mir.otdel o_1 (cost=0.00..3.13 rows=13 width=106) (never executed)

  • Output: o_1.oid, o_1.lpu, o_1.addressex, o_1.parent, o_1.name, o_1.otdel_code, o_1.location, o_1.distance, o_1.otdel_type, o_1.otdel_profile, o_1.foms_code, o_1.sysdate, o_1.show_on_site, o_1.shortname
93. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ux_pk_hospital_move_b_hospital on hosp.hospital_move_bed hmb (cost=0.14..8.16 rows=1 width=296) (never executed)

  • Output: hmb.hospital_move, hmb.bed
  • Index Cond: (hmb.hospital_move = prs.oid)
  • Heap Fetches: 0
94. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_bed on mir.bed (cost=0.14..0.42 rows=1 width=296) (never executed)

  • Output: bed.oid, bed.room, bed.scheduled_days, bed.actual_days, bed.bed_dynamic, bed.bed_day, bed.bed_children, bed.bed_profile
  • Index Cond: (bed.oid = hmb.bed)
95. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_room on mir.room (cost=0.14..0.45 rows=1 width=664) (never executed)

  • Output: room.oid, room.otdel, room.building, room.room_name, room.identifier, room.room_type, room.rooms, room.primary_seats, room.additional_seats, room.area, room.window_view
  • Index Cond: (room.oid = bed.room)
96. 0.063 0.063 ↑ 166.7 6 1

Result (cost=0.00..5.25 rows=1,000 width=0) (actual time=0.061..0.063 rows=6 loops=1)

  • Output: mir.mdoc_type_ambul_list()
  • Buffers: shared hit=1
97. 0.596 0.596 ↑ 1.0 1 149

Seq Scan on mir.otdel o_2 (cost=0.00..3.16 rows=1 width=37) (actual time=0.003..0.004 rows=1 loops=149)

  • Output: o_2.oid
  • Filter: (o_2.oid = create_sotr.otdel)
  • Rows Removed by Filter: 12
  • Buffers: shared hit=447
98. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.14..11.70 rows=1 width=37) (never executed)

  • Output: o_3.oid
99. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.14..11.70 rows=1 width=37) (never executed)

  • Output: o_3.oid
  • Join Filter: (prs_1.otdel = o_3.oid)
100. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_fk_hospital_move_mdoc on hosp.hospital_move prs_1 (cost=0.14..8.41 rows=1 width=148) (never executed)

  • Output: prs_1.oid, prs_1.mdoc, prs_1.otdel, prs_1.bed_profile, prs_1.data_begin, prs_1.data_end, prs_1.documents_service, prs_1.doctor, prs_1.count_place, prs_1.planing, prs_1.create_date
  • Index Cond: (prs_1.mdoc = presc.mdoc_id)
  • Filter: (prs_1.oid = hosp.peresel_get_max_peresel_id(prs_1.mdoc))
101. 0.000 0.000 ↓ 0.0 0

Seq Scan on mir.otdel o_3 (cost=0.00..3.13 rows=13 width=37) (never executed)

  • Output: o_3.oid, o_3.lpu, o_3.addressex, o_3.parent, o_3.name, o_3.otdel_code, o_3.location, o_3.distance, o_3.otdel_type, o_3.otdel_profile, o_3.foms_code, o_3.sysdate, o_3.show_on_site, o_3.shortname
102. 0.315 6,964.277 ↓ 18.6 149 1

Hash Left Join (cost=2,867.55..3,043.90 rows=8 width=7,006) (actual time=6,961.435..6,964.277 rows=149 loops=1)

  • Output: t_presc.oid, t_presc.prescid, t_presc.complexid, t_presc.executiondate, t_presc.createdate, t_presc.prescstateid, t_presc.mdocid, t_presc.updatedate, t_presc.signdate, t_presc.sotrid, t_presc.groupappointment, t_presc.cito, t_presc.accessionnumber_, t_presc.presctypeid, t_presc.isprofexpresctipe, t_presc.isfuture, t_presc.creatorid, t_presc.lpu, t_presc.referralid, t_presc.isreadonly, t_presc.peopleid, t_presc.placework, t_presc.peoplefullname, t_presc.birthday, t_presc.sex, t_presc.age, t_presc.mdocstatus, t_presc.mdoctypeid, t_presc.mdoctypename, t_presc.mdoctypesynonim, t_presc.mdocnum, t_presc.presctypename, t_presc.presctypefoldername, t_presc.sotrname, t_presc.sotrfullname, t_presc.prescstatename, t_presc.cabinetname, t_presc.ambtickstatusid, t_presc.isambtickclose, t_presc.ambtickstatusname, t_presc.visitid, t_presc.visitbegindate, t_presc.visitenddate, t_presc.insuranceid, t_presc.isperformer, t_presc.isaccess, t_presc.multisign, t_presc.paytypename, t_presc.paystatusid, t_presc.paystatusname, t_presc.phone, t_presc.ispregnancy, t_presc.insuranceinfo, t_presc.mkb10name, t_presc.profexlistid, t_presc.comment, t_presc.balance, t_presc.paramdata, t_presc.otdelname, t_presc.otdelid, t_presc.schedulecomment, t_presc.patientwaiting, t_presc.islivequeue, t_presc.inwork, t_presc.balancerest, ((COALESCE((t_presc.presctypefoldername || ' '::text), ''::text) || (t_presc.presctypename)::text) || COALESCE(((' ('::text || NULLIF((t_presc.paramdata)::text, ''::text)) || ')'::text), ''::text)), (t_presc.profexlistid IS NOT NULL), CASE WHEN ((hashed SubPlan 14) OR ((t_presc.mdoctypesynonim)::text = 'STAC_VRACH_ZAKL'::text)) THEN 'амб'::text ELSE 'стац'::text END, NULL::numeric, CASE WHEN (pds.presc_id IS NOT NULL) THEN (pds.accession_number)::character varying ELSE t_presc.accessionnumber_ END, CASE WHEN (pds.presc_id IS NOT NULL) THEN (pds.study_status = 3) WHEN ((t_presc.accessionnumber_ IS NOT NULL) AND (pds.presc_id IS NULL)) THEN COALESCE((SubPlan 15), false) ELSE false END, xray_referral.urgency_id, xray_referral.referal_num, CASE WHEN (xray_referral.oid IS NOT NULL) THEN (SubPlan 16) ELSE NULL::bigint END, pinfo.black_list, pinfo.black_list_comment
  • Hash Cond: (t_presc.prescid = bu.presc)
  • Buffers: shared hit=700839
103. 0.084 6,955.914 ↓ 29.8 149 1

Nested Loop Left Join (cost=0.73..98.52 rows=5 width=7,006) (actual time=6,953.351..6,955.914 rows=149 loops=1)

  • Output: t_presc.oid, t_presc.prescid, t_presc.complexid, t_presc.executiondate, t_presc.createdate, t_presc.prescstateid, t_presc.mdocid, t_presc.updatedate, t_presc.signdate, t_presc.sotrid, t_presc.groupappointment, t_presc.cito, t_presc.accessionnumber_, t_presc.presctypeid, t_presc.isprofexpresctipe, t_presc.isfuture, t_presc.creatorid, t_presc.lpu, t_presc.referralid, t_presc.isreadonly, t_presc.peopleid, t_presc.placework, t_presc.peoplefullname, t_presc.birthday, t_presc.sex, t_presc.age, t_presc.mdocstatus, t_presc.mdoctypeid, t_presc.mdoctypename, t_presc.mdoctypesynonim, t_presc.mdocnum, t_presc.presctypename, t_presc.presctypefoldername, t_presc.sotrname, t_presc.sotrfullname, t_presc.prescstatename, t_presc.cabinetname, t_presc.ambtickstatusid, t_presc.isambtickclose, t_presc.ambtickstatusname, t_presc.visitid, t_presc.visitbegindate, t_presc.visitenddate, t_presc.insuranceid, t_presc.isperformer, t_presc.isaccess, t_presc.multisign, t_presc.paytypename, t_presc.paystatusid, t_presc.paystatusname, t_presc.phone, t_presc.ispregnancy, t_presc.insuranceinfo, t_presc.mkb10name, t_presc.profexlistid, t_presc.comment, t_presc.balance, t_presc.paramdata, t_presc.otdelname, t_presc.otdelid, t_presc.schedulecomment, t_presc.patientwaiting, t_presc.islivequeue, t_presc.inwork, t_presc.balancerest, xray_referral.urgency_id, xray_referral.referal_num, xray_referral.oid, pds.presc_id, pds.accession_number, pds.study_status, pinfo.black_list, pinfo.black_list_comment
  • Buffers: shared hit=699436
104. 0.109 6,953.595 ↓ 29.8 149 1

Nested Loop Left Join (cost=0.44..56.96 rows=5 width=6,587) (actual time=6,953.304..6,953.595 rows=149 loops=1)

  • Output: t_presc.oid, t_presc.prescid, t_presc.complexid, t_presc.executiondate, t_presc.createdate, t_presc.prescstateid, t_presc.mdocid, t_presc.updatedate, t_presc.signdate, t_presc.sotrid, t_presc.groupappointment, t_presc.cito, t_presc.accessionnumber_, t_presc.presctypeid, t_presc.isprofexpresctipe, t_presc.isfuture, t_presc.creatorid, t_presc.lpu, t_presc.referralid, t_presc.isreadonly, t_presc.peopleid, t_presc.placework, t_presc.peoplefullname, t_presc.birthday, t_presc.sex, t_presc.age, t_presc.mdocstatus, t_presc.mdoctypeid, t_presc.mdoctypename, t_presc.mdoctypesynonim, t_presc.mdocnum, t_presc.presctypename, t_presc.presctypefoldername, t_presc.sotrname, t_presc.sotrfullname, t_presc.prescstatename, t_presc.cabinetname, t_presc.ambtickstatusid, t_presc.isambtickclose, t_presc.ambtickstatusname, t_presc.visitid, t_presc.visitbegindate, t_presc.visitenddate, t_presc.insuranceid, t_presc.isperformer, t_presc.isaccess, t_presc.multisign, t_presc.paytypename, t_presc.paystatusid, t_presc.paystatusname, t_presc.phone, t_presc.ispregnancy, t_presc.insuranceinfo, t_presc.mkb10name, t_presc.profexlistid, t_presc.comment, t_presc.balance, t_presc.paramdata, t_presc.otdelname, t_presc.otdelid, t_presc.schedulecomment, t_presc.patientwaiting, t_presc.islivequeue, t_presc.inwork, t_presc.balancerest, xray_referral.urgency_id, xray_referral.referal_num, xray_referral.oid, pds.presc_id, pds.accession_number, pds.study_status
  • Buffers: shared hit=698986
105. 0.200 6,953.486 ↓ 29.8 149 1

Hash Right Join (cost=0.16..15.41 rows=5 width=5,997) (actual time=6,953.298..6,953.486 rows=149 loops=1)

  • Output: t_presc.oid, t_presc.prescid, t_presc.complexid, t_presc.executiondate, t_presc.createdate, t_presc.prescstateid, t_presc.mdocid, t_presc.updatedate, t_presc.signdate, t_presc.sotrid, t_presc.groupappointment, t_presc.cito, t_presc.accessionnumber_, t_presc.presctypeid, t_presc.isprofexpresctipe, t_presc.isfuture, t_presc.creatorid, t_presc.lpu, t_presc.referralid, t_presc.isreadonly, t_presc.peopleid, t_presc.placework, t_presc.peoplefullname, t_presc.birthday, t_presc.sex, t_presc.age, t_presc.mdocstatus, t_presc.mdoctypeid, t_presc.mdoctypename, t_presc.mdoctypesynonim, t_presc.mdocnum, t_presc.presctypename, t_presc.presctypefoldername, t_presc.sotrname, t_presc.sotrfullname, t_presc.prescstatename, t_presc.cabinetname, t_presc.ambtickstatusid, t_presc.isambtickclose, t_presc.ambtickstatusname, t_presc.visitid, t_presc.visitbegindate, t_presc.visitenddate, t_presc.insuranceid, t_presc.isperformer, t_presc.isaccess, t_presc.multisign, t_presc.paytypename, t_presc.paystatusid, t_presc.paystatusname, t_presc.phone, t_presc.ispregnancy, t_presc.insuranceinfo, t_presc.mkb10name, t_presc.profexlistid, t_presc.comment, t_presc.balance, t_presc.paramdata, t_presc.otdelname, t_presc.otdelid, t_presc.schedulecomment, t_presc.patientwaiting, t_presc.islivequeue, t_presc.inwork, t_presc.balancerest, pds.presc_id, pds.accession_number, pds.study_status
  • Hash Cond: (pds.presc_id = t_presc.oid)
  • Buffers: shared hit=698986
106. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on mir.presc_dicom_study pds (cost=0.00..14.75 rows=127 width=184) (actual time=0.000..0.000 rows=0 loops=1)

  • Output: pds.presc_id, pds.accession_number, pds.study_status
  • Filter: (pds.study_status >= 0)
107. 0.340 6,953.286 ↓ 29.8 149 1

Hash (cost=0.10..0.10 rows=5 width=5,813) (actual time=6,953.286..6,953.286 rows=149 loops=1)

  • Output: t_presc.oid, t_presc.prescid, t_presc.complexid, t_presc.executiondate, t_presc.createdate, t_presc.prescstateid, t_presc.mdocid, t_presc.updatedate, t_presc.signdate, t_presc.sotrid, t_presc.groupappointment, t_presc.cito, t_presc.accessionnumber_, t_presc.presctypeid, t_presc.isprofexpresctipe, t_presc.isfuture, t_presc.creatorid, t_presc.lpu, t_presc.referralid, t_presc.isreadonly, t_presc.peopleid, t_presc.placework, t_presc.peoplefullname, t_presc.birthday, t_presc.sex, t_presc.age, t_presc.mdocstatus, t_presc.mdoctypeid, t_presc.mdoctypename, t_presc.mdoctypesynonim, t_presc.mdocnum, t_presc.presctypename, t_presc.presctypefoldername, t_presc.sotrname, t_presc.sotrfullname, t_presc.prescstatename, t_presc.cabinetname, t_presc.ambtickstatusid, t_presc.isambtickclose, t_presc.ambtickstatusname, t_presc.visitid, t_presc.visitbegindate, t_presc.visitenddate, t_presc.insuranceid, t_presc.isperformer, t_presc.isaccess, t_presc.multisign, t_presc.paytypename, t_presc.paystatusid, t_presc.paystatusname, t_presc.phone, t_presc.ispregnancy, t_presc.insuranceinfo, t_presc.mkb10name, t_presc.profexlistid, t_presc.comment, t_presc.balance, t_presc.paramdata, t_presc.otdelname, t_presc.otdelid, t_presc.schedulecomment, t_presc.patientwaiting, t_presc.islivequeue, t_presc.inwork, t_presc.balancerest
  • Buckets: 1024 Batches: 1 Memory Usage: 166kB
  • Buffers: shared hit=698986
108. 6,952.946 6,952.946 ↓ 29.8 149 1

CTE Scan on t_presc (cost=0.00..0.10 rows=5 width=5,813) (actual time=42.894..6,952.946 rows=149 loops=1)

  • Output: t_presc.oid, t_presc.prescid, t_presc.complexid, t_presc.executiondate, t_presc.createdate, t_presc.prescstateid, t_presc.mdocid, t_presc.updatedate, t_presc.signdate, t_presc.sotrid, t_presc.groupappointment, t_presc.cito, t_presc.accessionnumber_, t_presc.presctypeid, t_presc.isprofexpresctipe, t_presc.isfuture, t_presc.creatorid, t_presc.lpu, t_presc.referralid, t_presc.isreadonly, t_presc.peopleid, t_presc.placework, t_presc.peoplefullname, t_presc.birthday, t_presc.sex, t_presc.age, t_presc.mdocstatus, t_presc.mdoctypeid, t_presc.mdoctypename, t_presc.mdoctypesynonim, t_presc.mdocnum, t_presc.presctypename, t_presc.presctypefoldername, t_presc.sotrname, t_presc.sotrfullname, t_presc.prescstatename, t_presc.cabinetname, t_presc.ambtickstatusid, t_presc.isambtickclose, t_presc.ambtickstatusname, t_presc.visitid, t_presc.visitbegindate, t_presc.visitenddate, t_presc.insuranceid, t_presc.isperformer, t_presc.isaccess, t_presc.multisign, t_presc.paytypename, t_presc.paystatusid, t_presc.paystatusname, t_presc.phone, t_presc.ispregnancy, t_presc.insuranceinfo, t_presc.mkb10name, t_presc.profexlistid, t_presc.comment, t_presc.balance, t_presc.paramdata, t_presc.otdelname, t_presc.otdelid, t_presc.schedulecomment, t_presc.patientwaiting, t_presc.islivequeue, t_presc.inwork, t_presc.balancerest
  • Buffers: shared hit=698986
109. 0.000 0.000 ↓ 0.0 0 149

Index Scan using pk_xray_referal on mir.xray_referral (cost=0.28..8.30 rows=1 width=590) (actual time=0.000..0.000 rows=0 loops=149)

  • Output: xray_referral.oid, xray_referral.mdoc_id, xray_referral.careate_sotr_id, xray_referral.register_sotr_id, xray_referral.laborant_sotr_id, xray_referral.purpose_id, xray_referral.urgency_id, xray_referral.bonus_id, xray_referral.duty, xray_referral.referal_num, xray_referral.create_dt, xray_referral.run_dt
  • Index Cond: (xray_referral.oid = t_presc.referralid)
110. 2.235 2.235 ↑ 1.0 1 149

Index Scan using pk_pinfo on mir.pinfo (cost=0.29..8.30 rows=1 width=456) (actual time=0.014..0.015 rows=1 loops=149)

  • Output: pinfo.oid, pinfo.blood_gr, pinfo.bloood_rez, pinfo.marriage, pinfo.nacionality, pinfo.education, pinfo.living_condition, pinfo.liveplace, pinfo.regplace, pinfo.socialrank, pinfo.favorkind, pinfo.dispgroup, pinfo.country, pinfo.parent_status_id, pinfo.parent_surname, pinfo.parent_name, pinfo.parent_patron, pinfo.burn_place, pinfo.flurolast_dt, pinfo.fluroplan_dt, pinfo.ambul_dt, pinfo.stacionar_dt, pinfo.sanator_dt, pinfo.spec_dt, pinfo.daystac_dt, pinfo.alko, pinfo.narko, pinfo.smok, pinfo.hard_life, pinfo.recipe_lgot_type, pinfo.grouphealth, pinfo.inn, pinfo.phone_home, pinfo.phone_mobile, pinfo.icd10_id, pinfo.sysdate, pinfo.undefined_pac, pinfo.uek, pinfo.people_profession, pinfo.is_agreement_pac, pinfo.alien, pinfo.birthtime, pinfo.personal_agreement, pinfo.personal_agreement_date, pinfo.socialgroup, pinfo.diplomatic_status, pinfo.work_kind, pinfo.location, pinfo.black_list, pinfo.black_list_comment, pinfo.proxydate, pinfo.proxynumber
  • Index Cond: (pinfo.oid = t_presc.peopleid)
  • Buffers: shared hit=450
111. 0.068 7.976 ↓ 1.0 344 1

Hash (cost=2,854.81..2,854.81 rows=340 width=37) (actual time=7.976..7.976 rows=344 loops=1)

  • Output: bu.presc
  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
  • Buffers: shared hit=1402
112. 0.029 7.908 ↓ 1.0 344 1

Subquery Scan on bu (cost=2,847.16..2,854.81 rows=340 width=37) (actual time=7.817..7.908 rows=344 loops=1)

  • Output: bu.presc
  • Buffers: shared hit=1402
113. 0.336 7.879 ↓ 1.0 344 1

HashAggregate (cost=2,847.16..2,851.41 rows=340 width=42) (actual time=7.817..7.879 rows=344 loops=1)

  • Output: presc_service.presc, sum(bill_uslug.paid)
  • Group Key: presc_service.presc
  • Buffers: shared hit=1402
114. 0.291 7.543 ↓ 1.0 344 1

Nested Loop (cost=0.42..2,845.46 rows=340 width=42) (actual time=0.058..7.543 rows=344 loops=1)

  • Output: presc_service.presc, bill_uslug.paid
  • Buffers: shared hit=1402
115. 0.252 0.252 ↓ 1.0 350 1

Seq Scan on mir.bill_uslug (cost=0.00..14.63 rows=346 width=42) (actual time=0.008..0.252 rows=350 loops=1)

  • Output: bill_uslug.oid, bill_uslug.bill_id, bill_uslug.presc_service, bill_uslug.cost, bill_uslug.transaction, bill_uslug.refuse_transaction, bill_uslug.paid, bill_uslug.last_paid_bill, bill_uslug.presc_service_history
  • Filter: ((bill_uslug.refuse_transaction IS NULL) AND (bill_uslug.last_paid_bill = 1::numeric))
  • Rows Removed by Filter: 23
  • Buffers: shared hit=10
116. 7.000 7.000 ↑ 1.0 1 350

Index Scan using pk_presc_service on mir.presc_service (cost=0.42..8.17 rows=1 width=74) (actual time=0.020..0.020 rows=1 loops=350)

  • Output: presc_service.oid, presc_service.service_presctype, presc_service.presc, presc_service.counterpart_program, presc_service.pay_status, presc_service.custom_price
  • Index Cond: (presc_service.oid = bill_uslug.presc_service)
  • Buffers: shared hit=1392
117.          

SubPlan (for Hash Left Join)

118. 0.072 0.072 ↑ 166.7 6 1

Result (cost=0.00..5.25 rows=1,000 width=0) (actual time=0.070..0.072 rows=6 loops=1)

  • Output: mir.mdoc_type_ambul_list()
  • Buffers: shared hit=1
119. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.00..1.59 rows=1 width=0) (never executed)

  • Output: (true)
120. 0.000 0.000 ↓ 0.0 0

Seq Scan on mir.dicom_wlres_buffer dic (cost=0.00..1.59 rows=1 width=0) (never executed)

  • Output: true
  • Filter: ((dic.accessionnumber)::text = (t_presc.accessionnumber_)::text)
121. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.16..8.17 rows=1 width=0) (never executed)

  • Output: count(*)
122. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ix_fk_xray_result_xray_referral on mir.xray_result xres (cost=0.14..8.16 rows=1 width=0) (never executed)

  • Output: xres.xray_referral_id
  • Index Cond: (xres.xray_referral_id = xray_referral.oid)
  • Heap Fetches: 0
Planning time : 58.673 ms
Execution time : 6,967.197 ms