explain.depesz.com

PostgreSQL's explain analyze made readable

Result: krMn

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=357,328.87..357,404.10 rows=3 width=1,552) (actual rows= loops=)

  • Output: get_hmsv_fee_all.hfe_docno, (get_patientname(hms_doc.hd_docno)), hms_patient.hp_sex, (to_char((hms_patient.hp_birthdate)::timestamp with time zone, 'DDMMYYYY'::text)), (CASE WHEN (length((hms_patient.hp_workplace)::text) > 0) THEN (hms_patient.hp_workplace)::text ELSE btrim((((hms_patient.hp_dtladdr)::text || ','::text) || hms_getaddress(hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid))) END), ((SubPlan 1)), hms_object.ho_desc, hms_clinical_record.hcr_recordno, (to_char(hms_doc.hd_admitdate, 'DDMMYYYY'::text)), (to_char(hms_doc.hd_enddate, 'DDMMYYYY'::text)), sum(get_hmsv_fee_all.hfe_cost) FILTER (WHERE (CASE get_hmsv_fee_all.hfe_type WHEN 'D'::text THEN CASE get_hmsv_fee_all.hfe_group WHEN 'A2000'::text THEN 't_mau'::text WHEN 'A9000'::text THEN 't_vtyt'::text ELSE 't_thuoc'::text END WHEN 'P'::text THEN CASE substr((get_hmsv_fee_all.hfe_group)::text, 1, 2) WHEN 'B2'::text THEN 't_cdha'::text WHEN 'B3'::text THEN 't_tdcn'::text WHEN 'B1'::text THEN CASE substr((get_hmsv_fee_all.hfe_group)::text, 1, 3) WHEN 'B11'::text THEN 't_huyet_hoc'::text WHEN 'B15'::text THEN 't_vi_sinh'::text WHEN 'B1E'::text THEN 't_gpb'::text ELSE 't_hoa_sinh'::text END ELSE NULL::text END WHEN 'B'::text THEN 't_giuong'::text WHEN 'O'::text THEN CASE WHEN ((get_hmsv_fee_all.pdept_id)::text = ANY ('{PHCN,YHCT}'::text[])) THEN 't_vltl'::text ELSE 't_pttt'::text END WHEN 'E'::text THEN 't_kham'::text WHEN 'X'::text THEN 't_khac'::text ELSE NULL::text END = 't_thuoc'::text)), sum(get_hmsv_fee_all.hfe_cost) FILTER (WHERE (CASE get_hmsv_fee_all.hfe_type WHEN 'D'::text THEN CASE get_hmsv_fee_all.hfe_group WHEN 'A2000'::text THEN 't_mau'::text WHEN 'A9000'::text THEN 't_vtyt'::text ELSE 't_thuoc'::text END WHEN 'P'::text THEN CASE substr((get_hmsv_fee_all.hfe_group)::text, 1, 2) WHEN 'B2'::text THEN 't_cdha'::text WHEN 'B3'::text THEN 't_tdcn'::text WHEN 'B1'::text THEN CASE substr((get_hmsv_fee_all.hfe_group)::text, 1, 3) WHEN 'B11'::text THEN 't_huyet_hoc'::text WHEN (...)
  • Group Key: get_hmsv_fee_all.hfe_docno, (get_patientname(hms_doc.hd_docno)), hms_patient.hp_sex, (to_char((hms_patient.hp_birthdate)::timestamp with time zone, 'DDMMYYYY'::text)), (CASE WHEN (length((hms_patient.hp_workplace)::text) > 0) THEN (hms_patient.hp_workplace)::text ELSE btrim((((hms_patient.hp_dtladdr)::text || ','::text) || hms_getaddress(hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid))) END), ((SubPlan 1)), hms_object.ho_desc, hms_clinical_record.hcr_recordno, (to_char(hms_doc.hd_admitdate, 'DDMMYYYY'::text)), (to_char(hms_doc.hd_enddate, 'DDMMYYYY'::text)), hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver
2. 0.000 0.000 ↓ 0.0

Sort (cost=357,328.87..357,328.88 rows=3 width=580) (actual rows= loops=)

  • Output: get_hmsv_fee_all.hfe_docno, (get_patientname(hms_doc.hd_docno)), hms_patient.hp_sex, (to_char((hms_patient.hp_birthdate)::timestamp with time zone, 'DDMMYYYY'::text)), (CASE WHEN (length((hms_patient.hp_workplace)::text) > 0) THEN (hms_patient.hp_workplace)::text ELSE btrim((((hms_patient.hp_dtladdr)::text || ','::text) || hms_getaddress(hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid))) END), ((SubPlan 1)), hms_object.ho_desc, hms_clinical_record.hcr_recordno, (to_char(hms_doc.hd_admitdate, 'DDMMYYYY'::text)), (to_char(hms_doc.hd_enddate, 'DDMMYYYY'::text)), hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status
  • Sort Key: get_hmsv_fee_all.hfe_docno, (get_patientname(hms_doc.hd_docno)), hms_patient.hp_sex, (to_char((hms_patient.hp_birthdate)::timestamp with time zone, 'DDMMYYYY'::text)), (CASE WHEN (length((hms_patient.hp_workplace)::text) > 0) THEN (hms_patient.hp_workplace)::text ELSE btrim((((hms_patient.hp_dtladdr)::text || ','::text) || hms_getaddress(hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid))) END), ((SubPlan 1)), hms_object.ho_desc, hms_clinical_record.hcr_recordno, (to_char(hms_doc.hd_admitdate, 'DDMMYYYY'::text)), (to_char(hms_doc.hd_enddate, 'DDMMYYYY'::text)), hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=321,656.00..357,328.85 rows=3 width=580) (actual rows= loops=)

  • Output: get_hmsv_fee_all.hfe_docno, get_patientname(hms_doc.hd_docno), hms_patient.hp_sex, to_char((hms_patient.hp_birthdate)::timestamp with time zone, 'DDMMYYYY'::text), CASE WHEN (length((hms_patient.hp_workplace)::text) > 0) THEN (hms_patient.hp_workplace)::text ELSE btrim((((hms_patient.hp_dtladdr)::text || ','::text) || hms_getaddress(hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid))) END, (SubPlan 1), hms_object.ho_desc, hms_clinical_record.hcr_recordno, to_char(hms_doc.hd_admitdate, 'DDMMYYYY'::text), to_char(hms_doc.hd_enddate, 'DDMMYYYY'::text), hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status
  • Join Filter: ((hms_object.ho_id)::text = (hms_doc.hd_object)::text)
4. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=321,656.00..357,266.95 rows=1 width=206) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, hms_doc.hd_docno, hms_doc.hd_admitdate, hms_doc.hd_enddate, hms_doc.hd_object, hms_patient.hp_sex, hms_patient.hp_birthdate, hms_patient.hp_workplace, hms_patient.hp_dtladdr, hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid, hms_patient.hp_occupation, hms_clinical_record.hcr_recordno
  • Hash Cond: (hms_clinical_record.hcr_docno = hms_doc.hd_docno)
5. 0.000 0.000 ↓ 0.0

Seq Scan on public.hms_clinical_record (cost=0.00..33,960.96 rows=439,996 width=10) (actual rows= loops=)

  • Output: hms_clinical_record.hcr_createdby, hms_clinical_record.hcr_createddate, hms_clinical_record.hcr_updatedby, hms_clinical_record.hcr_updateddate, hms_clinical_record.hcr_patientno, hms_clinical_record.hcr_docno, hms_clinical_record.hcr_recordno, hms_clinical_record.hcr_status, hms_clinical_record.hcr_instate, hms_clinical_record.hcr_admitdate, hms_clinical_record.hcr_admitdept, hms_clinical_record.hcr_admiticd, hms_clinical_record.hcr_admitdisease, hms_clinical_record.hcr_mainicd, hms_clinical_record.hcr_maindisease, hms_clinical_record.hcr_reldisease, hms_clinical_record.hcr_dischargedate, hms_clinical_record.hcr_dischargedept, hms_clinical_record.hcr_reason, hms_clinical_record.hcr_pathological, hms_clinical_record.hcr_systemic, hms_clinical_record.hcr_partsbody, hms_clinical_record.hcr_speciality, hms_clinical_record.hcr_tests, hms_clinical_record.hcr_summarize, hms_clinical_record.hcr_prognosis, hms_clinical_record.hcr_suggestion, hms_clinical_record.hcr_gpathological, hms_clinical_record.hcr_gtests, hms_clinical_record.hcr_gmethod, hms_clinical_record.hcr_goutstate, hms_clinical_record.hcr_gsuggestion, hms_clinical_record.hcr_gsuggestion2, hms_clinical_record.hcr_transstate, hms_clinical_record.hcr_transhosid, hms_clinical_record.hcr_discharge, hms_clinical_record.hcr_sumtreat, hms_clinical_record.hcr_result, hms_clinical_record.hcr_diedate, hms_clinical_record.hcr_diestate, hms_clinical_record.hcr_diereason, hms_clinical_record.hcr_conclusion, hms_clinical_record.hcr_clindoctor, hms_clinical_record.hcr_treatdoctor, hms_clinical_record.hcr_sender, hms_clinical_record.hcr_receiver, hms_clinical_record.hcr_hospitalid, hms_clinical_record.hcr_admitdirect, hms_clinical_record.hcr_transplace, hms_clinical_record.hcr_treattime, hms_clinical_record.hcr_refidx, hms_clinical_record.hcr_admitnumber
6. 0.000 0.000 ↓ 0.0

Hash (cost=321,655.99..321,655.99 rows=1 width=200) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, hms_doc.hd_docno, hms_doc.hd_admitdate, hms_doc.hd_enddate, hms_doc.hd_object, hms_patient.hp_sex, hms_patient.hp_birthdate, hms_patient.hp_workplace, hms_patient.hp_dtladdr, hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid, hms_patient.hp_occupation
7. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=287,123.34..321,655.99 rows=1 width=200) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, hms_doc.hd_docno, hms_doc.hd_admitdate, hms_doc.hd_enddate, hms_doc.hd_object, hms_patient.hp_sex, hms_patient.hp_birthdate, hms_patient.hp_workplace, hms_patient.hp_dtladdr, hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid, hms_patient.hp_occupation
  • Hash Cond: ((hms_card.hc_patientno = hms_patient.hp_patientno) AND (hms_card.hc_idx = hms_doc.hd_cardidx) AND ((hms_card.hc_cardno)::text = (hms_doc.hd_cardno)::text))
8. 0.000 0.000 ↓ 0.0

Seq Scan on public.hms_card (cost=0.00..24,559.24 rows=886,524 width=28) (actual rows= loops=)

  • Output: hms_card.hc_createdby, hms_card.hc_createddate, hms_card.hc_updatedby, hms_card.hc_updateddate, hms_card.hc_patientno, hms_card.hc_cardno, hms_card.hc_idx, hms_card.hc_regdate, hms_card.hc_expdate, hms_card.hc_regcode, hms_card.hc_company, hms_card.hc_code, hms_card.hc_discount, hms_card.hc_active, hms_card.hc_line, hms_card.hc_groupid, hms_card.hc_regarea
9. 0.000 0.000 ↓ 0.0

Hash (cost=287,123.32..287,123.32 rows=1 width=225) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, hms_doc.hd_docno, hms_doc.hd_admitdate, hms_doc.hd_enddate, hms_doc.hd_cardidx, hms_doc.hd_cardno, hms_doc.hd_object, hms_patient.hp_sex, hms_patient.hp_birthdate, hms_patient.hp_workplace, hms_patient.hp_dtladdr, hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid, hms_patient.hp_occupation, hms_patient.hp_patientno
10. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=257,243.15..287,123.32 rows=1 width=225) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, hms_doc.hd_docno, hms_doc.hd_admitdate, hms_doc.hd_enddate, hms_doc.hd_cardidx, hms_doc.hd_cardno, hms_doc.hd_object, hms_patient.hp_sex, hms_patient.hp_birthdate, hms_patient.hp_workplace, hms_patient.hp_dtladdr, hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid, hms_patient.hp_occupation, hms_patient.hp_patientno
  • Hash Cond: (hms_patient.hp_patientno = hms_doc.hd_patientno)
11. 0.000 0.000 ↓ 0.0

Seq Scan on public.hms_patient (cost=0.00..26,572.48 rows=882,048 width=38) (actual rows= loops=)

  • Output: hms_patient.hp_createdby, hms_patient.hp_createddate, hms_patient.hp_updatedby, hms_patient.hp_updateddate, hms_patient.hp_patientno, hms_patient.hp_patientid, hms_patient.hp_surname, hms_patient.hp_midname, hms_patient.hp_firstname, hms_patient.hp_birthdate, hms_patient.hp_sex, hms_patient.hp_ethnic, hms_patient.hp_religion, hms_patient.hp_sin, hms_patient.hp_provid, hms_patient.hp_distid, hms_patient.hp_villid, hms_patient.hp_dtladdr, hms_patient.hp_occupation, hms_patient.hp_workplaceid, hms_patient.hp_workplace, hms_patient.hp_rank, hms_patient.hp_position, hms_patient.hp_status, hms_patient.hp_type, hms_patient.hp_cmnd, hms_patient.hp_yearofbirth, hms_patient.hp_bd
12. 0.000 0.000 ↓ 0.0

Hash (cost=257,243.14..257,243.14 rows=1 width=191) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, hms_doc.hd_docno, hms_doc.hd_admitdate, hms_doc.hd_enddate, hms_doc.hd_patientno, hms_doc.hd_cardidx, hms_doc.hd_cardno, hms_doc.hd_object
13. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=146,756.05..257,243.14 rows=1 width=191) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, hms_doc.hd_docno, hms_doc.hd_admitdate, hms_doc.hd_enddate, hms_doc.hd_patientno, hms_doc.hd_cardidx, hms_doc.hd_cardno, hms_doc.hd_object
  • Hash Cond: (hms_doc.hd_docno = hms_fee_invoice.hfi_docno)
14. 0.000 0.000 ↓ 0.0

Seq Scan on public.hms_doc (cost=0.00..103,263.88 rows=1,926,188 width=47) (actual rows= loops=)

  • Output: hms_doc.hd_createdby, hms_doc.hd_createddate, hms_doc.hd_updatedby, hms_doc.hd_updateddate, hms_doc.hd_patientno, hms_doc.hd_docno, hms_doc.hd_status, hms_doc.hd_yofage, hms_doc.hd_mofage, hms_doc.hd_dofege, hms_doc.hd_telephone, hms_doc.hd_relative, hms_doc.hd_relation, hms_doc.hd_contactaddr, hms_doc.hd_contacttel, hms_doc.hd_emergency, hms_doc.hd_object, hms_doc.hd_cardno, hms_doc.hd_cardidx, hms_doc.hd_disrate, hms_doc.hd_insline, hms_doc.hd_transplace, hms_doc.hd_transdiagn, hms_doc.hd_admitstate, hms_doc.hd_admitdept, hms_doc.hd_admitdate, hms_doc.hd_outstate, hms_doc.hd_enddept, hms_doc.hd_enddate, hms_doc.hd_icd, hms_doc.hd_diagnostic, hms_doc.hd_reldisease, hms_doc.hd_conclusion, hms_doc.hd_suggestion, hms_doc.hd_result, hms_doc.hd_doctor, hms_doc.hd_indept, hms_doc.hd_tohosid, hms_doc.hd_outpatient, hms_doc.hd_areceptidx, hms_doc.hd_treatmethod, hms_doc.hdf_invoicefee, hms_doc.hdf_acceptedfee, hms_doc.hdf_accepteddate, hms_doc.hdf_acceptedby, hms_doc.hd_transplaceid, hms_doc.hd_transicd, hms_doc.hd_insregdate, hms_doc.hd_xobject, hms_doc.hd_xcardno, hms_doc.hd_xissueplace, hms_doc.hd_xissuedate, hms_doc.hd_xrate, hms_doc.hd_hasxcard, hms_doc.hd_reexam, hms_doc.hd_over5year, hms_doc.hd_icd2, hms_doc.hd_datediscountall, hms_doc.hd_xcardidx, hms_doc.hd_feepatpaiddate, hms_doc.hd_reexaminday, hms_doc.hd_feepatpaid
15. 0.000 0.000 ↓ 0.0

Hash (cost=146,756.03..146,756.03 rows=1 width=148) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, hms_fee_invoice.hfi_docno, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status
16. 0.000 0.000 ↓ 0.0

Hash Join (cost=12.82..146,756.03 rows=1 width=148) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_receiver, hms_fee_invoice.hfi_docno, get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status
  • Hash Cond: ((hms_fee_invoice.hfi_invoiceno = get_hmsv_fee_all.hfe_invoiceno) AND (hms_fee_invoice.hfi_docno = get_hmsv_fee_all.hfe_docno))
17. 0.000 0.000 ↓ 0.0

Seq Scan on public.hms_fee_invoice (cost=0.00..146,472.56 rows=36,085 width=36) (actual rows= loops=)

  • Output: hms_fee_invoice.hfi_createdby, hms_fee_invoice.hfi_createddate, hms_fee_invoice.hfi_updatedby, hms_fee_invoice.hfi_updateddate, hms_fee_invoice.hfi_patientno, hms_fee_invoice.hfi_docno, hms_fee_invoice.hfi_invoiceno, hms_fee_invoice.hfi_type, hms_fee_invoice.hfi_class, hms_fee_invoice.hfi_category, hms_fee_invoice.hfi_object, hms_fee_invoice.hfi_cardidx, hms_fee_invoice.hfi_status, hms_fee_invoice.hfi_deskno, hms_fee_invoice.hfi_bookno, hms_fee_invoice.hfi_serialno, hms_fee_invoice.hfi_recvno, hms_fee_invoice.hfi_recvdate, hms_fee_invoice.hfi_receiver, hms_fee_invoice.hfi_locked, hms_fee_invoice.hfi_lockeddate, hms_fee_invoice.hfi_locker, hms_fee_invoice.hfi_posted, hms_fee_invoice.hfi_posteddate, hms_fee_invoice.hfi_poster, hms_fee_invoice.hfi_desc, hms_fee_invoice.hfi_cost, hms_fee_invoice.hfi_discount, hms_fee_invoice.hfi_patpaid, hms_fee_invoice.hfi_printed, hms_fee_invoice.hfi_depts, hms_fee_invoice.hfi_deptid, hms_fee_invoice.hfi_refinvoice, hms_fee_invoice.hfi_advanceamt, hms_fee_invoice.hfi_refundamt, hms_fee_invoice.hfi_advpayment, hms_fee_invoice.hfi_free, hms_fee_invoice.hfi_insinvoice, hms_fee_invoice.hfi_refidx
  • Filter: ((hms_fee_invoice.hfi_recvdate >= '2019-01-01 00:00:00'::timestamp without time zone) AND (hms_fee_invoice.hfi_recvdate <= '2019-03-01 00:00:00'::timestamp without time zone) AND ((hms_fee_invoice.hfi_type)::text = 'P'::text))
18. 0.000 0.000 ↓ 0.0

Hash (cost=12.75..12.75 rows=5 width=120) (actual rows= loops=)

  • Output: get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, get_hmsv_fee_all.hfe_invoiceno
19. 0.000 0.000 ↓ 0.0

Function Scan on public.get_hmsv_fee_all (cost=0.25..12.75 rows=5 width=120) (actual rows= loops=)

  • Output: get_hmsv_fee_all.hfe_docno, get_hmsv_fee_all.hfe_cost, get_hmsv_fee_all.hfe_type, get_hmsv_fee_all.hfe_group, get_hmsv_fee_all.pdept_id, get_hmsv_fee_all.hfe_status, get_hmsv_fee_all.hfe_invoiceno
  • Function Call: get_hmsv_fee_all('2019-01-01 00:00:00'::timestamp without time zone, '2019-03-01 00:00:00'::timestamp without time zone)
  • Filter: ((get_hmsv_fee_all.hfe_status)::text = 'P'::text)
20. 0.000 0.000 ↓ 0.0

Seq Scan on public.hms_object (cost=0.00..15.30 rows=530 width=96) (actual rows= loops=)

  • Output: hms_object.ho_id, hms_object.ho_desc, hms_object.ho_hascard, hms_object.ho_type, hms_object.ho_discount, hms_object.ho_active
21.          

SubPlan (for Nested Loop Left Join)

22. 0.000 0.000 ↓ 0.0

Seq Scan on public.sys_sel (cost=0.00..12.80 rows=1 width=180) (actual rows= loops=)

  • Output: sys_sel.ss_desc
  • Filter: (((sys_sel.ss_id)::text = 'sys_occupation'::text) AND ((sys_sel.ss_code)::integer = hms_patient.hp_occupation))
23.          

SubPlan (for GroupAggregate)

24. 0.000 0.000 ↓ 0.0

Seq Scan on public.sys_user (cost=0.00..10.38 rows=1 width=148) (actual rows= loops=)

  • Output: sys_user.su_name
  • Filter: ((sys_user.su_userid)::text = (hms_fee_invoice.hfi_receiver)::text)