explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vmGB

Settings
# exclusive inclusive rows x rows loops node
1. 2.224 827.631 ↓ 4.8 10,000 1

Limit (cost=138,158.59..227,682.10 rows=2,068 width=7,251) (actual time=25.983..827.631 rows=10,000 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code, p.id, p.created_dt, p.note, p.vip, p.rh_blood_group_id, p.ethnic_group_id, p.social_group_id, p.death_src_inf_id, p.empl_state_death_id, p.unidentified_dt, p.newborn_number, p.education_type_id, p.birthweight, p.aud_who, p.aud_when, p.aud_source, p.aud_who_create, p.aud_when_create, p.aud_source_create, p.employee_reg_death_position_id, p.last_fluorography_date, p.is_arch, p.birth_height, i.id, i.birth_dt, i.death_dt, i.has_citizenship, i.name, i.patr_name, i.surname, i.gender_id, i.nationality_id, i.list_identity_doc, i.list_oms_doc, i.list_job_org, i.list_reg_name, i.list_snils, i.list_uid, i.aud_who, i.aud_when, i.aud_source, i.aud_who_create, i.aud_when_create, i.aud_source_create, i.birth_place, i.age_year, i.age_month, i.age_day, i.list_main_contact, i.is_only_birth_year, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id, pd.id, pd.is_available_diagnosis, pd.code, pd.from_dt, pd.name, pd.to_dt, pd.accounting_center_id, pd.type_id, pd.funding_id, pd.org_id, pd.parent_id, pd.sphere_id, pd.is_payment, pd.unit_id, pd.kind_id, pd.e_code, pd.scope_id, pd.aud_who, pd.aud_when, pd.aud_source, pd.aud_who_create, pd.aud_when_create, pd.aud_source_create, pd.is_separate, pd.is_social_significant, pd.age_group_id, pd.is_branch_type, pd.visits_per_shift, pd.departures_per_shift, pd.visits_per_day, pd.necropsies_per_day, pd.clinical_trials_per_shift, pd.brigades_amount, pd.ose, pd.ose_reject, pd.at_home, pd.longitude, pd.latitude, pd.amb_reception_exists, pd.cadastral_number, pd.hospital_mode_id, pd.type_profile_id, mcd.id, mcd.establishment_date, mcd.note, mcd.diagnos_id, mcd.disease_type_id, mcd.doctor_id, mcd.injury_type_id, mcd.case_id, mcd.patient_id, mcd.stage_id, mcd.step_id, mcd.type_id, mcd.is_main, mcd.is_suspicion, mcd.mes_id, mcd.aud_who, mcd.aud_when, mcd.aud_source, mcd.aud_who_create, mcd.aud_when_create, mcd.aud_source_create, mcd.clinical_form_id, mcd.localization_id, mcd.complication_id, mcd.standard_id, mcd.csg_id, mcd.injury_reason_id, mcd.is_zno_suspicion, mdd.id, mdd.code, mdd.name, mdd.parent_id, mdd.is_injury, mdd.level, mdd.is_leaf, mdd.e_code, mdd.oms, mdd.stomat, mdd.aud_who, mdd.aud_when, mdd.aud_source, mdd.aud_who_create, mdd.aud_when_create, mdd.aud_source_create, mdd.from_dt, mdd.to_dt, ec.id, ec.case_id, ec.group_id, ec.level_id, ec.expert_id
  • Buffers: shared hit=268891
2.          

CTE prm

3. 0.006 0.006 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.005..0.006 rows=1 loops=1)

  • Output: 1, 1805409, '2019-12-01'::date, '2020-01-01'::date, '2019-12-01'::date, '2020-01-01'::date, 58710, 5996
4.          

CTE user_rights_pattern

5. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.99..25.68 rows=1 width=19) (never executed)

  • Output: p_1.allowed, p_1.permission_id
6. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..8.77 rows=2 width=4) (never executed)

  • Output: r.role_id
7. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.28..8.33 rows=1 width=4) (never executed)

  • Output: ac.id
8. 0.000 0.000 ↓ 0.0 0

CTE Scan on prm prm_1 (cost=0.00..0.02 rows=1 width=8) (never executed)

  • Output: prm_1.user_id, prm_1.clinic_id, prm_1.open_date_begin, prm_1.open_date_end, prm_1.close_date_begin, prm_1.close_date_end, prm_1.emp_pos_context, prm_1.dep_context
9. 0.000 0.000 ↓ 0.0 0

Index Scan using access_key_user_id_ix on sec.access_key ac (cost=0.28..8.30 rows=1 width=12) (never executed)

  • Output: ac.id, ac.type_id, ac.org_id, ac.empl_pos_id, ac.user_id, ac.name, ac.is_blocked, ac.aud_who, ac.aud_when, ac.aud_source, ac.aud_who_create, ac.aud_when_create, ac.aud_source_create
  • Index Cond: (ac.user_id = prm_1.user_id)
  • Filter: (prm_1.clinic_id = ac.org_id)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_user_access_role_user_access_id on sec.access_key_role r (cost=0.29..0.42 rows=2 width=8) (never executed)

  • Output: r.id, r.role_id, r.user_access_id, r.aud_who, r.aud_when, r.aud_source, r.aud_who_create, r.aud_when_create, r.aud_source_create
  • Index Cond: (r.user_access_id = ac.id)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_permission_ref_role_id on sec.permission_ref p_1 (cost=0.42..8.44 rows=1 width=23) (never executed)

  • Output: p_1.id, p_1.section_id, p_1.element_id, p_1.permission_id, p_1.allowed, p_1.role_id, p_1.aud_who, p_1.aud_when, p_1.aud_source, p_1.aud_who_create, p_1.aud_when_create, p_1.aud_source_create, p_1.section_name, p_1.element_name, p_1.permission_name
  • Index Cond: (p_1.role_id = r.role_id)
  • Filter: (p_1.allowed AND (p_1.element_id = 'internalExamination'::text) AND (p_1.permission_id = ANY ('{readLevel1,readLevel2,readLevel3}'::text[])))
12.          

CTE cases

13. 2.530 51.813 ↓ 4.5 10,072 1

Nested Loop (cost=0.44..137,070.01 rows=2,214 width=4) (actual time=0.162..51.813 rows=10,072 loops=1)

  • Output: c.id
  • Buffers: shared hit=6460
14. 0.011 0.011 ↑ 1.0 1 1

CTE Scan on prm prm_2 (cost=0.00..0.02 rows=1 width=20) (actual time=0.011..0.011 rows=1 loops=1)

  • Output: prm_2.user_id, prm_2.clinic_id, prm_2.open_date_begin, prm_2.open_date_end, prm_2.close_date_begin, prm_2.close_date_end, prm_2.emp_pos_context, prm_2.dep_context
15. 49.272 49.272 ↓ 4.5 10,072 1

Index Scan using mc_case_close_date_clinic_id_idx on public.mc_case c (cost=0.44..137,047.85 rows=2,214 width=16) (actual time=0.137..49.272 rows=10,072 loops=1)

  • Output: c.id, c.clinic_id, c.open_date, c.close_date
  • Index Cond: ((c.close_date >= COALESCE(prm_2.close_date_begin, '-infinity'::date)) AND (c.close_date <= COALESCE(prm_2.close_date_end, 'infinity'::date)) AND (c.clinic_id = prm_2.clinic_id))
  • Filter: ((c.case_type_id = ANY ('{1,2}'::integer[])) AND CASE WHEN (c.case_type_id = 2) THEN (c.main_diagnos_id IS NOT NULL) ELSE true END AND (c.open_date >= COALESCE(prm_2.open_date_begin, '-infinity'::date)) AND (c.open_date <= COALESCE(prm_2.open_date_end, 'infinity'::date)))
  • Rows Removed by Filter: 1543
  • Buffers: shared hit=6460
16. 35.612 825.407 ↓ 4.8 10,000 1

Nested Loop Left Join (cost=1,062.89..90,586.41 rows=2,068 width=7,251) (actual time=25.982..825.407 rows=10,000 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code, p.id, p.created_dt, p.note, p.vip, p.rh_blood_group_id, p.ethnic_group_id, p.social_group_id, p.death_src_inf_id, p.empl_state_death_id, p.unidentified_dt, p.newborn_number, p.education_type_id, p.birthweight, p.aud_who, p.aud_when, p.aud_source, p.aud_who_create, p.aud_when_create, p.aud_source_create, p.employee_reg_death_position_id, p.last_fluorography_date, p.is_arch, p.birth_height, i.id, i.birth_dt, i.death_dt, i.has_citizenship, i.name, i.patr_name, i.surname, i.gender_id, i.nationality_id, i.list_identity_doc, i.list_oms_doc, i.list_job_org, i.list_reg_name, i.list_snils, i.list_uid, i.aud_who, i.aud_when, i.aud_source, i.aud_who_create, i.aud_when_create, i.aud_source_create, i.birth_place, i.age_year, i.age_month, i.age_day, i.list_main_contact, i.is_only_birth_year, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id, pd.id, pd.is_available_diagnosis, pd.code, pd.from_dt, pd.name, pd.to_dt, pd.accounting_center_id, pd.type_id, pd.funding_id, pd.org_id, pd.parent_id, pd.sphere_id, pd.is_payment, pd.unit_id, pd.kind_id, pd.e_code, pd.scope_id, pd.aud_who, pd.aud_when, pd.aud_source, pd.aud_who_create, pd.aud_when_create, pd.aud_source_create, pd.is_separate, pd.is_social_significant, pd.age_group_id, pd.is_branch_type, pd.visits_per_shift, pd.departures_per_shift, pd.visits_per_day, pd.necropsies_per_day, pd.clinical_trials_per_shift, pd.brigades_amount, pd.ose, pd.ose_reject, pd.at_home, pd.longitude, pd.latitude, pd.amb_reception_exists, pd.cadastral_number, pd.hospital_mode_id, pd.type_profile_id, mcd.id, mcd.establishment_date, mcd.note, mcd.diagnos_id, mcd.disease_type_id, mcd.doctor_id, mcd.injury_type_id, mcd.case_id, mcd.patient_id, mcd.stage_id, mcd.step_id, mcd.type_id, mcd.is_main, mcd.is_suspicion, mcd.mes_id, mcd.aud_who, mcd.aud_when, mcd.aud_source, mcd.aud_who_create, mcd.aud_when_create, mcd.aud_source_create, mcd.clinical_form_id, mcd.localization_id, mcd.complication_id, mcd.standard_id, mcd.csg_id, mcd.injury_reason_id, mcd.is_zno_suspicion, mdd.id, mdd.code, mdd.name, mdd.parent_id, mdd.is_injury, mdd.level, mdd.is_leaf, mdd.e_code, mdd.oms, mdd.stomat, mdd.aud_who, mdd.aud_when, mdd.aud_source, mdd.aud_who_create, mdd.aud_when_create, mdd.aud_source_create, mdd.from_dt, mdd.to_dt, ec.id, ec.case_id, ec.group_id, ec.level_id, ec.expert_id
  • Join Filter: (ec.case_id = mc.id)
  • Rows Removed by Join Filter: 170000
  • Buffers: shared hit=268891
17. 19.047 779.795 ↓ 4.8 10,000 1

Hash Join (cost=1,062.89..90,461.28 rows=2,068 width=7,231) (actual time=25.926..779.795 rows=10,000 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code, p.id, p.created_dt, p.note, p.vip, p.rh_blood_group_id, p.ethnic_group_id, p.social_group_id, p.death_src_inf_id, p.empl_state_death_id, p.unidentified_dt, p.newborn_number, p.education_type_id, p.birthweight, p.aud_who, p.aud_when, p.aud_source, p.aud_who_create, p.aud_when_create, p.aud_source_create, p.employee_reg_death_position_id, p.last_fluorography_date, p.is_arch, p.birth_height, i.id, i.birth_dt, i.death_dt, i.has_citizenship, i.name, i.patr_name, i.surname, i.gender_id, i.nationality_id, i.list_identity_doc, i.list_oms_doc, i.list_job_org, i.list_reg_name, i.list_snils, i.list_uid, i.aud_who, i.aud_when, i.aud_source, i.aud_who_create, i.aud_when_create, i.aud_source_create, i.birth_place, i.age_year, i.age_month, i.age_day, i.list_main_contact, i.is_only_birth_year, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id, pd.id, pd.is_available_diagnosis, pd.code, pd.from_dt, pd.name, pd.to_dt, pd.accounting_center_id, pd.type_id, pd.funding_id, pd.org_id, pd.parent_id, pd.sphere_id, pd.is_payment, pd.unit_id, pd.kind_id, pd.e_code, pd.scope_id, pd.aud_who, pd.aud_when, pd.aud_source, pd.aud_who_create, pd.aud_when_create, pd.aud_source_create, pd.is_separate, pd.is_social_significant, pd.age_group_id, pd.is_branch_type, pd.visits_per_shift, pd.departures_per_shift, pd.visits_per_day, pd.necropsies_per_day, pd.clinical_trials_per_shift, pd.brigades_amount, pd.ose, pd.ose_reject, pd.at_home, pd.longitude, pd.latitude, pd.amb_reception_exists, pd.cadastral_number, pd.hospital_mode_id, pd.type_profile_id, mcd.id, mcd.establishment_date, mcd.note, mcd.diagnos_id, mcd.disease_type_id, mcd.doctor_id, mcd.injury_type_id, mcd.case_id, mcd.patient_id, mcd.stage_id, mcd.step_id, mcd.type_id, mcd.is_main, mcd.is_suspicion, mcd.mes_id, mcd.aud_who, mcd.aud_when, mcd.aud_source, mcd.aud_who_create, mcd.aud_when_create, mcd.aud_source_create, mcd.clinical_form_id, mcd.localization_id, mcd.complication_id, mcd.standard_id, mcd.csg_id, mcd.injury_reason_id, mcd.is_zno_suspicion, mdd.id, mdd.code, mdd.name, mdd.parent_id, mdd.is_injury, mdd.level, mdd.is_leaf, mdd.e_code, mdd.oms, mdd.stomat, mdd.aud_who, mdd.aud_when, mdd.aud_source, mdd.aud_who_create, mdd.aud_when_create, mdd.aud_source_create, mdd.from_dt, mdd.to_dt
  • Hash Cond: (mcd.diagnos_id = mdd.id)
  • Buffers: shared hit=268890
18. 18.091 743.804 ↓ 4.8 10,000 1

Nested Loop (cost=331.03..89,700.98 rows=2,068 width=6,823) (actual time=8.796..743.804 rows=10,000 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code, p.id, p.created_dt, p.note, p.vip, p.rh_blood_group_id, p.ethnic_group_id, p.social_group_id, p.death_src_inf_id, p.empl_state_death_id, p.unidentified_dt, p.newborn_number, p.education_type_id, p.birthweight, p.aud_who, p.aud_when, p.aud_source, p.aud_who_create, p.aud_when_create, p.aud_source_create, p.employee_reg_death_position_id, p.last_fluorography_date, p.is_arch, p.birth_height, i.id, i.birth_dt, i.death_dt, i.has_citizenship, i.name, i.patr_name, i.surname, i.gender_id, i.nationality_id, i.list_identity_doc, i.list_oms_doc, i.list_job_org, i.list_reg_name, i.list_snils, i.list_uid, i.aud_who, i.aud_when, i.aud_source, i.aud_who_create, i.aud_when_create, i.aud_source_create, i.birth_place, i.age_year, i.age_month, i.age_day, i.list_main_contact, i.is_only_birth_year, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id, pd.id, pd.is_available_diagnosis, pd.code, pd.from_dt, pd.name, pd.to_dt, pd.accounting_center_id, pd.type_id, pd.funding_id, pd.org_id, pd.parent_id, pd.sphere_id, pd.is_payment, pd.unit_id, pd.kind_id, pd.e_code, pd.scope_id, pd.aud_who, pd.aud_when, pd.aud_source, pd.aud_who_create, pd.aud_when_create, pd.aud_source_create, pd.is_separate, pd.is_social_significant, pd.age_group_id, pd.is_branch_type, pd.visits_per_shift, pd.departures_per_shift, pd.visits_per_day, pd.necropsies_per_day, pd.clinical_trials_per_shift, pd.brigades_amount, pd.ose, pd.ose_reject, pd.at_home, pd.longitude, pd.latitude, pd.amb_reception_exists, pd.cadastral_number, pd.hospital_mode_id, pd.type_profile_id, mcd.id, mcd.establishment_date, mcd.note, mcd.diagnos_id, mcd.disease_type_id, mcd.doctor_id, mcd.injury_type_id, mcd.case_id, mcd.patient_id, mcd.stage_id, mcd.step_id, mcd.type_id, mcd.is_main, mcd.is_suspicion, mcd.mes_id, mcd.aud_who, mcd.aud_when, mcd.aud_source, mcd.aud_who_create, mcd.aud_when_create, mcd.aud_source_create, mcd.clinical_form_id, mcd.localization_id, mcd.complication_id, mcd.standard_id, mcd.csg_id, mcd.injury_reason_id, mcd.is_zno_suspicion
  • Buffers: shared hit=268494
19. 18.459 635.713 ↓ 4.8 10,000 1

Hash Join (cost=330.47..75,982.59 rows=2,075 width=6,696) (actual time=8.719..635.713 rows=10,000 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code, p.id, p.created_dt, p.note, p.vip, p.rh_blood_group_id, p.ethnic_group_id, p.social_group_id, p.death_src_inf_id, p.empl_state_death_id, p.unidentified_dt, p.newborn_number, p.education_type_id, p.birthweight, p.aud_who, p.aud_when, p.aud_source, p.aud_who_create, p.aud_when_create, p.aud_source_create, p.employee_reg_death_position_id, p.last_fluorography_date, p.is_arch, p.birth_height, i.id, i.birth_dt, i.death_dt, i.has_citizenship, i.name, i.patr_name, i.surname, i.gender_id, i.nationality_id, i.list_identity_doc, i.list_oms_doc, i.list_job_org, i.list_reg_name, i.list_snils, i.list_uid, i.aud_who, i.aud_when, i.aud_source, i.aud_who_create, i.aud_when_create, i.aud_source_create, i.birth_place, i.age_year, i.age_month, i.age_day, i.list_main_contact, i.is_only_birth_year, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id, pd.id, pd.is_available_diagnosis, pd.code, pd.from_dt, pd.name, pd.to_dt, pd.accounting_center_id, pd.type_id, pd.funding_id, pd.org_id, pd.parent_id, pd.sphere_id, pd.is_payment, pd.unit_id, pd.kind_id, pd.e_code, pd.scope_id, pd.aud_who, pd.aud_when, pd.aud_source, pd.aud_who_create, pd.aud_when_create, pd.aud_source_create, pd.is_separate, pd.is_social_significant, pd.age_group_id, pd.is_branch_type, pd.visits_per_shift, pd.departures_per_shift, pd.visits_per_day, pd.necropsies_per_day, pd.clinical_trials_per_shift, pd.brigades_amount, pd.ose, pd.ose_reject, pd.at_home, pd.longitude, pd.latitude, pd.amb_reception_exists, pd.cadastral_number, pd.hospital_mode_id, pd.type_profile_id
  • Hash Cond: (closing_res_group.department_id = pd.id)
  • Buffers: shared hit=218449
20. 19.501 609.182 ↓ 4.6 10,071 1

Nested Loop (cost=2.30..75,625.49 rows=2,182 width=5,164) (actual time=0.531..609.182 rows=10,071 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code, p.id, p.created_dt, p.note, p.vip, p.rh_blood_group_id, p.ethnic_group_id, p.social_group_id, p.death_src_inf_id, p.empl_state_death_id, p.unidentified_dt, p.newborn_number, p.education_type_id, p.birthweight, p.aud_who, p.aud_when, p.aud_source, p.aud_who_create, p.aud_when_create, p.aud_source_create, p.employee_reg_death_position_id, p.last_fluorography_date, p.is_arch, p.birth_height, i.id, i.birth_dt, i.death_dt, i.has_citizenship, i.name, i.patr_name, i.surname, i.gender_id, i.nationality_id, i.list_identity_doc, i.list_oms_doc, i.list_job_org, i.list_reg_name, i.list_snils, i.list_uid, i.aud_who, i.aud_when, i.aud_source, i.aud_who_create, i.aud_when_create, i.aud_source_create, i.birth_place, i.age_year, i.age_month, i.age_day, i.list_main_contact, i.is_only_birth_year, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id
  • Buffers: shared hit=218282
21. 20.784 488.971 ↓ 4.6 10,071 1

Nested Loop (cost=1.87..61,660.55 rows=2,182 width=5,001) (actual time=0.457..488.971 rows=10,071 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code, i.id, i.birth_dt, i.death_dt, i.has_citizenship, i.name, i.patr_name, i.surname, i.gender_id, i.nationality_id, i.list_identity_doc, i.list_oms_doc, i.list_job_org, i.list_reg_name, i.list_snils, i.list_uid, i.aud_who, i.aud_when, i.aud_source, i.aud_who_create, i.aud_when_create, i.aud_source_create, i.birth_place, i.age_year, i.age_month, i.age_day, i.list_main_contact, i.is_only_birth_year, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id
  • Buffers: shared hit=177937
22. 17.999 357.406 ↓ 4.6 10,071 1

Nested Loop (cost=1.44..47,693.81 rows=2,182 width=4,113) (actual time=0.374..357.406 rows=10,071 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id
  • Join Filter: (mct.id = mc.case_type_id)
  • Rows Removed by Join Filter: 50353
  • Buffers: shared hit=137607
23. 11.802 329.336 ↓ 4.6 10,071 1

Nested Loop (cost=1.44..47,496.27 rows=2,182 width=3,944) (actual time=0.321..329.336 rows=10,071 loops=1)

  • Output: cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step, closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id
  • Buffers: shared hit=137606
24. 15.253 216.824 ↓ 4.6 10,071 1

Nested Loop (cost=0.88..32,949.41 rows=2,186 width=3,263) (actual time=0.270..216.824 rows=10,071 loops=1)

  • Output: cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data, closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step
  • Buffers: shared hit=87190
25. 13.680 120.995 ↓ 4.5 10,072 1

Nested Loop (cost=0.44..18,649.79 rows=2,214 width=3,072) (actual time=0.210..120.995 rows=10,072 loops=1)

  • Output: cases.id, mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data
  • Buffers: shared hit=46827
26. 56.955 56.955 ↓ 4.5 10,072 1

CTE Scan on cases (cost=0.00..44.28 rows=2,214 width=4) (actual time=0.165..56.955 rows=10,072 loops=1)

  • Output: cases.id
  • Buffers: shared hit=6460
27. 50.360 50.360 ↑ 1.0 1 10,072

Index Scan using mc_case_pk on public.mc_case mc (cost=0.44..8.39 rows=1 width=3,068) (actual time=0.005..0.005 rows=1 loops=10,072)

  • Output: mc.id, mc.create_date, mc.emergency_team_code, mc.note, mc.plan_case_duration, mc.plan_hosp_date, mc.uid, mc.who_delivered, mc.who_delivered_code, mc.who_delivered_team_number, mc.admission_reason_id, mc.admission_state_id, mc.admission_type_id, mc.care_level_id, mc.case_type_id, mc.clinic_id, mc.main_contract_id, mc.drunkenness_type_id, mc.funding_id, mc.init_goal_id, mc.init_type_id, mc.main_diagnos_id, mc.result_id, mc.patient_id, mc.referral_id, mc.care_regimen_id, mc.repeat_count_id, mc.soc_group_id, mc.state_id, mc.time_gone_id, mc.transporting_type_id, mc.referral_resulting_id, mc.payment_method_id, mc.complexity_level_id, mc.deviation_reason_id, mc.open_date, mc.closing_step_id, mc.provision_condition_id, mc.care_providing_form_id, mc.injury_type_id, mc.rankin_scale_for_admission_id, mc.rankin_scale_on_disposal_id, mc.notes_to_work, mc.aud_who, mc.aud_when, mc.aud_source, mc.aud_who_create, mc.aud_when_create, mc.aud_source_create, mc.hsp_canal_id, mc.open_time, mc.prehospital_stage_defect_id, mc.close_date, mc.mark, mc.is_need_sicklist, mc.narcotic_substance, mc.where_from_delivered, mc.severity_level_id, mc.is_social_significant, mc.death_reason, mc.is_finance_type_control, mc.is_control_case_init_goal, mc.ticket_vmp, mc.ticket_vmp_date, mc.planned_hospitalization_date, mc.external_reason_mkb_id, mc.additional_data
  • Index Cond: (mc.id = cases.id)
  • Buffers: shared hit=40367
28. 80.576 80.576 ↑ 1.0 1 10,072

Index Scan using mc_step_pk on public.mc_step closing_step (cost=0.44..6.45 rows=1 width=191) (actual time=0.008..0.008 rows=1 loops=10,072)

  • Output: closing_step.id, closing_step.admission_date, closing_step.admission_time, closing_step.death_date, closing_step.death_time, closing_step.outcome_date, closing_step.outcome_time, closing_step.death_employee_id, closing_step.main_diagnosis_id, closing_step.case_id, closing_step.outcome_id, closing_step.outcome_clinic_id, closing_step.outcome_regimen_id, closing_step.regimen_id, closing_step.res_group_id, closing_step.result_id, closing_step.reason_id, closing_step.profile_id, closing_step.mes_id, closing_step.mes_quality_criterion_id, closing_step.is_continue, closing_step.is_continue_editable, closing_step.standard_id, closing_step.csg_id, closing_step.vmp_type_id, closing_step.vmp_method_id, closing_step.deviation_reason_id, closing_step.aud_who, closing_step.aud_when, closing_step.aud_source, closing_step.aud_who_create, closing_step.aud_when_create, closing_step.aud_source_create, closing_step._clinic_id, closing_step._patient_id, closing_step.planned_date_closing_case, closing_step.gestational_age, closing_step.onko_stage, closing_step.hsp_bed_profile_id, closing_step.is_first_step
  • Index Cond: (closing_step.id = mc.closing_step_id)
  • Buffers: shared hit=40363
29. 100.710 100.710 ↑ 1.0 1 10,071

Index Scan using sr_res_group_pk on public.sr_res_group closing_res_group (cost=0.57..6.64 rows=1 width=681) (actual time=0.009..0.010 rows=1 loops=10,071)

  • Output: closing_res_group.id, closing_res_group.bdate, closing_res_group.edate, closing_res_group.is_system, closing_res_group.name, closing_res_group.department_id, closing_res_group.org_id, closing_res_group.responsible_id, closing_res_group.is_available_in_electronic_queue, closing_res_group.label_id, closing_res_group.ignore_regclinic_check, closing_res_group.note, closing_res_group.blocked, closing_res_group.block_comment, closing_res_group.template_res_group_id, closing_res_group.aud_who, closing_res_group.aud_when, closing_res_group.aud_source, closing_res_group.aud_who_create, closing_res_group.aud_when_create, closing_res_group.aud_source_create, closing_res_group.emergency, closing_res_group.ignore_districts, closing_res_group.service_template_id
  • Index Cond: (closing_res_group.id = closing_step.res_group_id)
  • Buffers: shared hit=50416
30. 10.050 10.071 ↑ 1.0 6 10,071

Materialize (cost=0.00..1.17 rows=6 width=169) (actual time=0.000..0.001 rows=6 loops=10,071)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code
  • Buffers: shared hit=1
31. 0.010 0.021 ↑ 1.0 6 1

Nested Loop (cost=0.00..1.14 rows=6 width=169) (actual time=0.012..0.021 rows=6 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context, mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code
  • Buffers: shared hit=1
32. 0.004 0.004 ↑ 1.0 1 1

CTE Scan on prm (cost=0.00..0.02 rows=1 width=32) (actual time=0.002..0.004 rows=1 loops=1)

  • Output: prm.user_id, prm.clinic_id, prm.open_date_begin, prm.open_date_end, prm.close_date_begin, prm.close_date_end, prm.emp_pos_context, prm.dep_context
33. 0.007 0.007 ↑ 1.0 6 1

Seq Scan on public.mc_case_type mct (cost=0.00..1.06 rows=6 width=137) (actual time=0.005..0.007 rows=6 loops=1)

  • Output: mct.id, mct.case_mode_id, mct.code, mct.name, mct.default_regimen_id, mct.e_code, mct.aud_who, mct.aud_when, mct.aud_source, mct.aud_who_create, mct.aud_when_create, mct.aud_source_create, mct.from_dt, mct.to_dt, mct.billing_code
  • Buffers: shared hit=1
34. 110.781 110.781 ↑ 1.0 1 10,071

Index Scan using pim_individual_pk on public.pim_individual i (cost=0.43..6.39 rows=1 width=888) (actual time=0.011..0.011 rows=1 loops=10,071)

  • Output: i.id, i.birth_dt, i.death_dt, i.has_citizenship, i.name, i.patr_name, i.surname, i.gender_id, i.nationality_id, i.list_identity_doc, i.list_oms_doc, i.list_job_org, i.list_reg_name, i.list_snils, i.list_uid, i.aud_who, i.aud_when, i.aud_source, i.aud_who_create, i.aud_when_create, i.aud_source_create, i.birth_place, i.age_year, i.age_month, i.age_day, i.list_main_contact, i.is_only_birth_year
  • Index Cond: (i.id = mc.patient_id)
  • Buffers: shared hit=40330
35. 100.710 100.710 ↑ 1.0 1 10,071

Index Scan using pci_patient_pk on public.pci_patient p (cost=0.43..6.39 rows=1 width=163) (actual time=0.010..0.010 rows=1 loops=10,071)

  • Output: p.id, p.created_dt, p.note, p.vip, p.rh_blood_group_id, p.ethnic_group_id, p.social_group_id, p.death_src_inf_id, p.empl_state_death_id, p.unidentified_dt, p.newborn_number, p.education_type_id, p.birthweight, p.aud_who, p.aud_when, p.aud_source, p.aud_who_create, p.aud_when_create, p.aud_source_create, p.employee_reg_death_position_id, p.last_fluorography_date, p.is_arch, p.birth_height
  • Index Cond: (p.id = mc.patient_id)
  • Buffers: shared hit=40345
36. 5.301 8.072 ↓ 1.0 7,164 1

Hash (cost=238.63..238.63 rows=7,163 width=1,532) (actual time=8.072..8.072 rows=7,164 loops=1)

  • Output: pd.id, pd.is_available_diagnosis, pd.code, pd.from_dt, pd.name, pd.to_dt, pd.accounting_center_id, pd.type_id, pd.funding_id, pd.org_id, pd.parent_id, pd.sphere_id, pd.is_payment, pd.unit_id, pd.kind_id, pd.e_code, pd.scope_id, pd.aud_who, pd.aud_when, pd.aud_source, pd.aud_who_create, pd.aud_when_create, pd.aud_source_create, pd.is_separate, pd.is_social_significant, pd.age_group_id, pd.is_branch_type, pd.visits_per_shift, pd.departures_per_shift, pd.visits_per_day, pd.necropsies_per_day, pd.clinical_trials_per_shift, pd.brigades_amount, pd.ose, pd.ose_reject, pd.at_home, pd.longitude, pd.latitude, pd.amb_reception_exists, pd.cadastral_number, pd.hospital_mode_id, pd.type_profile_id
  • Buckets: 8192 Batches: 1 Memory Usage: 1277kB
  • Buffers: shared hit=167
37. 2.771 2.771 ↓ 1.0 7,164 1

Seq Scan on public.pim_department pd (cost=0.00..238.63 rows=7,163 width=1,532) (actual time=0.017..2.771 rows=7,164 loops=1)

  • Output: pd.id, pd.is_available_diagnosis, pd.code, pd.from_dt, pd.name, pd.to_dt, pd.accounting_center_id, pd.type_id, pd.funding_id, pd.org_id, pd.parent_id, pd.sphere_id, pd.is_payment, pd.unit_id, pd.kind_id, pd.e_code, pd.scope_id, pd.aud_who, pd.aud_when, pd.aud_source, pd.aud_who_create, pd.aud_when_create, pd.aud_source_create, pd.is_separate, pd.is_social_significant, pd.age_group_id, pd.is_branch_type, pd.visits_per_shift, pd.departures_per_shift, pd.visits_per_day, pd.necropsies_per_day, pd.clinical_trials_per_shift, pd.brigades_amount, pd.ose, pd.ose_reject, pd.at_home, pd.longitude, pd.latitude, pd.amb_reception_exists, pd.cadastral_number, pd.hospital_mode_id, pd.type_profile_id
  • Buffers: shared hit=167
38. 90.000 90.000 ↑ 1.0 1 10,000

Index Scan using mc_diagnosis_pk on public.mc_diagnosis mcd (cost=0.56..6.60 rows=1 width=127) (actual time=0.009..0.009 rows=1 loops=10,000)

  • Output: mcd.id, mcd.establishment_date, mcd.note, mcd.diagnos_id, mcd.disease_type_id, mcd.doctor_id, mcd.injury_type_id, mcd.case_id, mcd.patient_id, mcd.stage_id, mcd.step_id, mcd.type_id, mcd.is_main, mcd.is_suspicion, mcd.mes_id, mcd.aud_who, mcd.aud_when, mcd.aud_source, mcd.aud_who_create, mcd.aud_when_create, mcd.aud_source_create, mcd.clinical_form_id, mcd.localization_id, mcd.complication_id, mcd.standard_id, mcd.csg_id, mcd.injury_reason_id, mcd.is_zno_suspicion
  • Index Cond: (mcd.id = mc.main_diagnos_id)
  • Buffers: shared hit=50045
39. 11.766 16.944 ↑ 1.0 14,927 1

Hash (cost=545.27..545.27 rows=14,927 width=408) (actual time=16.944..16.944 rows=14,927 loops=1)

  • Output: mdd.id, mdd.code, mdd.name, mdd.parent_id, mdd.is_injury, mdd.level, mdd.is_leaf, mdd.e_code, mdd.oms, mdd.stomat, mdd.aud_who, mdd.aud_when, mdd.aud_source, mdd.aud_who_create, mdd.aud_when_create, mdd.aud_source_create, mdd.from_dt, mdd.to_dt
  • Buckets: 16384 Batches: 1 Memory Usage: 3247kB
  • Buffers: shared hit=396
40. 5.178 5.178 ↑ 1.0 14,927 1

Seq Scan on public.md_diagnosis mdd (cost=0.00..545.27 rows=14,927 width=408) (actual time=0.014..5.178 rows=14,927 loops=1)

  • Output: mdd.id, mdd.code, mdd.name, mdd.parent_id, mdd.is_injury, mdd.level, mdd.is_leaf, mdd.e_code, mdd.oms, mdd.stomat, mdd.aud_who, mdd.aud_when, mdd.aud_source, mdd.aud_who_create, mdd.aud_when_create, mdd.aud_source_create, mdd.from_dt, mdd.to_dt
  • Buffers: shared hit=396
41. 9.975 10.000 ↓ 4.2 17 10,000

Materialize (cost=0.00..1.06 rows=4 width=20) (actual time=0.000..0.001 rows=17 loops=10,000)

  • Output: ec.id, ec.case_id, ec.group_id, ec.level_id, ec.expert_id
  • Buffers: shared hit=1
42. 0.025 0.025 ↓ 4.2 17 1

Seq Scan on supp.__ff_int_exam_case ec (cost=0.00..1.04 rows=4 width=20) (actual time=0.024..0.025 rows=17 loops=1)

  • Output: ec.id, ec.case_id, ec.group_id, ec.level_id, ec.expert_id
  • Buffers: shared hit=1
Planning time : 70.660 ms
Execution time : 831.731 ms