explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h65G

Settings
# exclusive inclusive rows x rows loops node
1. 302.858 272,128.189 ↓ 12.8 114,537 1

Sort (cost=14,810,005.17..14,810,027.55 rows=8,953 width=1,374) (actual time=272,113.912..272,128.189 rows=114,537 loops=1)

  • Sort Key: b.bill_no
  • Sort Method: quicksort Memory: 55016kB
2. 7.059 271,825.331 ↓ 12.8 114,537 1

Append (cost=7,887,953.98..14,809,417.48 rows=8,953 width=1,374) (actual time=117,942.977..271,825.331 rows=114,537 loops=1)

3. 68.022 145,454.863 ↓ 12.9 109,945 1

Hash Left Join (cost=7,887,953.98..8,637,613.96 rows=8,513 width=327) (actual time=117,942.976..145,454.863 rows=109,945 loops=1)

  • Hash Cond: ((pri_plan.insurance_co)::text = (picm.insurance_co_id)::text)
4. 27.248 145,386.599 ↓ 12.9 109,945 1

Hash Left Join (cost=7,887,893.42..8,637,381.73 rows=8,513 width=221) (actual time=117,942.704..145,386.599 rows=109,945 loops=1)

  • Hash Cond: ((pr.primary_sponsor_id)::text = (ptpa.tpa_id)::text)
5. 27.990 145,359.092 ↓ 12.9 109,945 1

Hash Left Join (cost=7,887,818.29..8,637,283.88 rows=8,513 width=207) (actual time=117,942.428..145,359.092 rows=109,945 loops=1)

  • Hash Cond: ((pr.org_id)::text = (od.org_id)::text)
6. 2,605.790 145,330.551 ↓ 12.9 109,945 1

Hash Right Join (cost=7,887,689.04..8,637,132.13 rows=8,513 width=194) (actual time=117,941.836..145,330.551 rows=109,945 loops=1)

  • Hash Cond: ((pri_plan.patient_id)::text = (pr.patient_id)::text)
7. 1,770.342 25,011.095 ↓ 1.0 8,070,603 1

Hash Join (cost=10,357.53..729,303.84 rows=8,069,529 width=24) (actual time=200.608..25,011.095 rows=8,070,603 loops=1)

  • Hash Cond: ((pri_plan.sponsor_id)::text = (pri_tm.tpa_id)::text)
8. 3,292.704 23,239.897 ↓ 1.0 8,070,603 1

Merge Left Join (cost=10,289.76..707,680.90 rows=8,069,529 width=34) (actual time=199.707..23,239.897 rows=8,070,603 loops=1)

  • Merge Cond: ((pri_plan.patient_id)::text = (sec_plan.patient_id)::text)
9. 19,732.377 19,732.377 ↓ 1.0 8,070,603 1

Index Scan using patient_insurance_plans_patient_id on patient_insurance_plans pri_plan (cost=0.56..675,428.96 rows=8,069,529 width=38) (actual time=0.024..19,732.377 rows=8,070,603 loops=1)

  • Filter: (priority = 1)
  • Rows Removed by Filter: 48988
10. 168.613 214.816 ↓ 1.1 48,988 1

Sort (cost=10,289.20..10,404.74 rows=46,215 width=38) (actual time=199.663..214.816 rows=48,988 loops=1)

  • Sort Key: sec_plan.patient_id
  • Sort Method: quicksort Memory: 5364kB
11. 46.203 46.203 ↓ 1.1 48,988 1

Index Scan using patient_insurance_plans_priority on patient_insurance_plans sec_plan (cost=0.43..6,708.44 rows=46,215 width=38) (actual time=0.027..46.203 rows=48,988 loops=1)

  • Index Cond: (priority = 2)
12. 0.090 0.856 ↑ 1.0 674 1

Hash (cost=45.87..45.87 rows=674 width=10) (actual time=0.856..0.856 rows=674 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
13. 0.766 0.766 ↑ 1.0 674 1

Index Only Scan using tpa_master_pkey on tpa_master pri_tm (cost=0.28..45.87 rows=674 width=10) (actual time=0.366..0.766 rows=674 loops=1)

  • Heap Fetches: 0
14. 76.555 117,713.666 ↓ 12.9 109,945 1

Hash (cost=7,877,054.84..7,877,054.84 rows=8,513 width=202) (actual time=117,713.666..117,713.666 rows=109,945 loops=1)

  • Buckets: 131072 (originally 16384) Batches: 1 (originally 1) Memory Usage: 26768kB
15. 54.332 117,637.111 ↓ 12.9 109,945 1

Hash Join (cost=5,004,666.64..7,877,054.84 rows=8,513 width=202) (actual time=96,468.195..117,637.111 rows=109,945 loops=1)

  • Hash Cond: (pr.center_id = hcm.center_id)
16. 13,248.218 117,582.757 ↓ 1.2 450,367 1

Hash Right Join (cost=5,004,661.11..7,875,756.44 rows=391,583 width=188) (actual time=96,207.065..117,582.757 rows=450,367 loops=1)

  • Hash Cond: (((pbcc.claim_id)::text = (pbcl.claim_id)::text) AND ((pbcc.charge_id)::text = (bcc.charge_id)::text))
17. 8,131.147 8,131.147 ↑ 1.0 40,793,842 1

Seq Scan on bill_charge_claim pbcc (cost=0.00..2,075,894.44 rows=40,819,048 width=24) (actual time=0.017..8,131.147 rows=40,793,842 loops=1)

18. 310.613 96,203.392 ↓ 1.2 450,367 1

Hash (cost=4,980,247.71..4,980,247.71 rows=391,583 width=198) (actual time=96,203.392..96,203.392 rows=450,367 loops=1)

  • Buckets: 524288 Batches: 2 Memory Usage: 57565kB
19. 0.000 95,892.779 ↓ 1.2 450,367 1

Gather (cost=4,757,978.87..4,980,247.71 rows=391,583 width=198) (actual time=91,845.654..95,892.779 rows=450,367 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
20. 971.758 95,951.949 ↑ 1.1 150,122 3 / 3

Merge Left Join (cost=4,756,978.87..4,940,089.41 rows=163,160 width=198) (actual time=91,828.631..95,951.949 rows=150,122 loops=3)

  • Merge Cond: ((pr.mr_no)::text = (pd.mr_no)::text)
21. 700.415 91,881.942 ↑ 1.1 150,122 3 / 3

Sort (cost=4,756,978.44..4,757,386.34 rows=163,160 width=198) (actual time=91,828.486..91,881.942 rows=150,122 loops=3)

  • Sort Key: pr.mr_no
  • Sort Method: quicksort Memory: 49589kB
22. 4,905.530 91,181.527 ↑ 1.1 150,122 3 / 3

Hash Join (cost=1,599,036.60..4,742,852.10 rows=163,160 width=198) (actual time=30,113.890..91,181.527 rows=150,122 loops=3)

  • Hash Cond: ((bcc.bill_no)::text = (b.bill_no)::text)
23. 56,167.324 56,167.324 ↑ 1.3 14,219,224 3 / 3

Parallel Seq Scan on bill_charge bcc (cost=0.00..3,072,201.06 rows=17,791,905 width=95) (actual time=0.235..56,167.324 rows=14,219,224 loops=3)

  • Filter: ((status <> 'X'::bpchar) AND ((charge_head)::text <> ALL ('{PHMED,PHCMED,PHRET,PHCRET}'::text[])))
  • Rows Removed by Filter: 1204619
24. 46.536 30,108.673 ↓ 1.0 91,116 3 / 3

Hash (cost=1,596,141.95..1,596,141.95 rows=89,066 width=117) (actual time=30,108.673..30,108.673 rows=91,116 loops=3)

  • Buckets: 131072 Batches: 1 Memory Usage: 14550kB
25. 1,830.106 30,062.137 ↓ 1.0 91,116 3 / 3

Hash Join (cost=1,101,031.86..1,596,141.95 rows=89,066 width=117) (actual time=21,819.304..30,062.137 rows=91,116 loops=3)

  • Hash Cond: ((b.visit_id)::text = (pr.patient_id)::text)
26. 25.983 8,522.373 ↓ 1.0 91,116 3 / 3

Hash Join (cost=62,927.17..470,624.47 rows=89,066 width=64) (actual time=2,087.409..8,522.373 rows=91,116 loops=3)

  • Hash Cond: (b.visit_type = bvn.visit_type)
27. 1,929.450 8,496.367 ↓ 1.0 91,116 3 / 3

Hash Right Join (cost=62,925.92..469,696.39 rows=89,066 width=62) (actual time=2,087.332..8,496.367 rows=91,116 loops=3)

  • Hash Cond: ((pbcl.bill_no)::text = (b.bill_no)::text)
28. 4,481.242 4,481.242 ↑ 1.0 7,474,211 3 / 3

Seq Scan on bill_claim pbcl (cost=0.00..387,132.42 rows=7,481,148 width=29) (actual time=0.034..4,481.242 rows=7,474,211 loops=3)

  • Filter: (priority = 1)
  • Rows Removed by Filter: 48547
29. 44.115 2,085.675 ↓ 1.0 91,116 3 / 3

Hash (cost=60,031.28..60,031.28 rows=89,066 width=48) (actual time=2,085.675..2,085.675 rows=91,116 loops=3)

  • Buckets: 131072 Batches: 1 Memory Usage: 8321kB
30. 2,041.560 2,041.560 ↓ 1.0 91,116 3 / 3

Index Scan using bill_finalized_date_idx on bill b (cost=0.56..60,031.28 rows=89,066 width=48) (actual time=0.772..2,041.560 rows=91,116 loops=3)

  • Index Cond: ((date(finalized_date) >= '2019-01-01'::date) AND (date(finalized_date) <= '2019-01-15'::date))
  • Filter: (is_tpa AND (status <> 'X'::bpchar))
  • Rows Removed by Filter: 28745
31. 0.005 0.023 ↑ 1.0 4 3 / 3

Hash (cost=1.12..1.12 rows=4 width=6) (actual time=0.022..0.023 rows=4 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.018 0.018 ↑ 1.0 4 3 / 3

Seq Scan on visit_type_names bvn (cost=0.00..1.12 rows=4 width=6) (actual time=0.017..0.018 rows=4 loops=3)

33. 3,135.670 19,709.658 ↓ 1.0 8,732,360 3 / 3

Hash (cost=669,078.97..669,078.97 rows=8,731,099 width=53) (actual time=19,709.658..19,709.658 rows=8,732,360 loops=3)

  • Buckets: 1048576 Batches: 16 Memory Usage: 54599kB
34. 16,573.988 16,573.988 ↓ 1.0 8,732,360 3 / 3

Seq Scan on patient_registration pr (cost=0.00..669,078.97 rows=8,731,099 width=53) (actual time=0.027..16,573.988 rows=8,732,360 loops=3)

35. 3,098.249 3,098.249 ↑ 1.0 3,010,110 3 / 3

Index Only Scan using patient_details_pkey on patient_details pd (cost=0.43..169,860.58 rows=3,015,916 width=15) (actual time=0.076..3,098.249 rows=3,010,110 loops=3)

  • Heap Fetches: 819253
36. 0.002 0.022 ↑ 1.0 1 1

Hash (cost=5.50..5.50 rows=1 width=22) (actual time=0.022..0.022 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
37. 0.020 0.020 ↑ 1.0 1 1

Seq Scan on hospital_center_master hcm (cost=0.00..5.50 rows=1 width=22) (actual time=0.015..0.020 rows=1 loops=1)

  • Filter: ((center_name)::text = 'NMCAbuDhabi'::text)
  • Rows Removed by Filter: 45
38. 0.231 0.551 ↑ 1.0 1,620 1

Hash (cost=76.60..76.60 rows=1,620 width=29) (actual time=0.550..0.551 rows=1,620 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 115kB
39. 0.320 0.320 ↑ 1.0 1,620 1

Seq Scan on organization_details od (cost=0.00..76.60 rows=1,620 width=29) (actual time=0.016..0.320 rows=1,620 loops=1)

40. 0.101 0.259 ↑ 1.0 674 1

Hash (cost=53.22..53.22 rows=674 width=34) (actual time=0.259..0.259 rows=674 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
41. 0.158 0.158 ↑ 1.0 674 1

Seq Scan on tpa_master ptpa (cost=0.00..53.22 rows=674 width=34) (actual time=0.010..0.158 rows=674 loops=1)

42. 0.107 0.242 ↑ 1.0 761 1

Hash (cost=35.83..35.83 rows=761 width=33) (actual time=0.242..0.242 rows=761 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 57kB
43. 0.135 0.135 ↑ 1.0 761 1

Seq Scan on insurance_company_master picm (cost=0.00..35.83 rows=761 width=33) (actual time=0.013..0.135 rows=761 loops=1)

44. 1.151 126,363.409 ↓ 10.4 4,592 1

Subquery Scan on *SELECT* 2 (cost=5,418,338.95..6,171,548.14 rows=440 width=374) (actual time=103,665.300..126,363.409 rows=4,592 loops=1)

45. 10.279 126,362.258 ↓ 10.4 4,592 1

Hash Left Join (cost=5,418,338.95..6,171,534.94 rows=440 width=358) (actual time=103,665.295..126,362.258 rows=4,592 loops=1)

  • Hash Cond: ((pri_plan_1.insurance_co)::text = (picm_1.insurance_co_id)::text)
46. 2.129 126,218.501 ↓ 10.4 4,592 1

Hash Left Join (cost=5,418,278.39..6,167,499.99 rows=440 width=294) (actual time=103,663.975..126,218.501 rows=4,592 loops=1)

  • Hash Cond: ((pr_1.primary_sponsor_id)::text = (ptpa_1.tpa_id)::text)
47. 2.374 126,216.062 ↓ 10.4 4,592 1

Hash Left Join (cost=5,418,203.26..6,167,423.68 rows=440 width=280) (actual time=103,663.650..126,216.062 rows=4,592 loops=1)

  • Hash Cond: ((pr_1.org_id)::text = (od_1.org_id)::text)
48. 1,105.538 126,213.044 ↓ 10.4 4,592 1

Hash Right Join (cost=5,418,074.01..6,167,293.27 rows=440 width=267) (actual time=103,662.947..126,213.044 rows=4,592 loops=1)

  • Hash Cond: ((pri_plan_1.patient_id)::text = (pr_1.patient_id)::text)
49. 1,716.730 21,709.196 ↓ 1.0 8,070,603 1

Hash Join (cost=10,357.53..729,303.84 rows=8,069,529 width=24) (actual time=231.057..21,709.196 rows=8,070,603 loops=1)

  • Hash Cond: ((pri_plan_1.sponsor_id)::text = (pri_tm_1.tpa_id)::text)
50. 3,227.073 19,991.377 ↓ 1.0 8,070,603 1

Merge Left Join (cost=10,289.76..707,680.90 rows=8,069,529 width=34) (actual time=229.812..19,991.377 rows=8,070,603 loops=1)

  • Merge Cond: ((pri_plan_1.patient_id)::text = (sec_plan_1.patient_id)::text)
51. 16,513.927 16,513.927 ↓ 1.0 8,070,603 1

Index Scan using patient_insurance_plans_patient_id on patient_insurance_plans pri_plan_1 (cost=0.56..675,428.96 rows=8,069,529 width=38) (actual time=0.018..16,513.927 rows=8,070,603 loops=1)

  • Filter: (priority = 1)
  • Rows Removed by Filter: 48988
52. 200.615 250.377 ↓ 1.1 48,988 1

Sort (cost=10,289.20..10,404.74 rows=46,215 width=38) (actual time=229.785..250.377 rows=48,988 loops=1)

  • Sort Key: sec_plan_1.patient_id
  • Sort Method: quicksort Memory: 5364kB
53. 49.762 49.762 ↓ 1.1 48,988 1

Index Scan using patient_insurance_plans_priority on patient_insurance_plans sec_plan_1 (cost=0.43..6,708.44 rows=46,215 width=38) (actual time=0.023..49.762 rows=48,988 loops=1)

  • Index Cond: (priority = 2)
54. 0.096 1.089 ↑ 1.0 674 1

Hash (cost=45.87..45.87 rows=674 width=10) (actual time=1.089..1.089 rows=674 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
55. 0.993 0.993 ↑ 1.0 674 1

Index Only Scan using tpa_master_pkey on tpa_master pri_tm_1 (cost=0.28..45.87 rows=674 width=10) (actual time=0.027..0.993 rows=674 loops=1)

  • Heap Fetches: 0
56. 3.622 103,398.310 ↓ 10.4 4,592 1

Hash (cost=5,407,702.19..5,407,702.19 rows=440 width=275) (actual time=103,398.310..103,398.310 rows=4,592 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1224kB
57. 3.755 103,394.688 ↓ 10.4 4,592 1

Hash Join (cost=5,229,526.61..5,407,702.19 rows=440 width=275) (actual time=99,327.549..103,394.688 rows=4,592 loops=1)

  • Hash Cond: (pr_1.center_id = hcm_1.center_id)
58. 860.200 103,390.898 ↓ 1.5 30,822 1

Merge Left Join (cost=5,229,521.08..5,407,629.81 rows=20,251 width=261) (actual time=99,321.633..103,390.898 rows=30,822 loops=1)

  • Merge Cond: ((pr_1.mr_no)::text = (pd_1.mr_no)::text)
59. 58.864 99,261.445 ↓ 1.5 30,822 1

Sort (cost=5,229,520.65..5,229,571.28 rows=20,251 width=261) (actual time=99,253.078..99,261.445 rows=30,822 loops=1)

  • Sort Key: pr_1.mr_no
  • Sort Method: quicksort Memory: 9180kB
60. 2,167.890 99,202.581 ↓ 1.5 30,822 1

Hash Join (cost=4,996,157.80..5,228,072.12 rows=20,251 width=261) (actual time=95,932.926..99,202.581 rows=30,822 loops=1)

  • Hash Cond: ((b_1.visit_id)::text = (pr_1.patient_id)::text)
61. 15.628 70,988.116 ↓ 1.5 30,822 1

Hash Join (cost=3,958,053.11..4,103,501.28 rows=20,251 width=208) (actual time=69,849.958..70,988.116 rows=30,822 loops=1)

  • Hash Cond: (s.medicine_id = m.medicine_id)
62. 588.791 70,942.294 ↓ 1.5 30,822 1

Hash Right Join (cost=3,950,569.99..4,095,964.99 rows=20,251 width=153) (actual time=69,819.484..70,942.294 rows=30,822 loops=1)

  • Hash Cond: ((pscl.sale_item_id = s.sale_item_id) AND ((pscl.claim_id)::text = (pbcl_1.claim_id)::text))
63. 541.472 541.472 ↓ 1.0 2,735,801 1

Seq Scan on sales_claim_details pscl (cost=0.00..124,886.78 rows=2,734,426 width=18) (actual time=0.036..541.472 rows=2,735,801 loops=1)

64. 19.266 69,812.031 ↓ 1.5 30,822 1

Hash (cost=3,949,861.20..3,949,861.20 rows=20,251 width=153) (actual time=69,812.031..69,812.031 rows=30,822 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 5491kB
65. 682.283 69,792.765 ↓ 1.5 30,822 1

Hash Join (cost=3,686,192.75..3,949,861.20 rows=20,251 width=153) (actual time=65,874.239..69,792.765 rows=30,822 loops=1)

  • Hash Cond: ((s.sale_id)::text = (ssm.sale_id)::text)
66. 3,240.189 3,240.189 ↓ 1.0 2,904,899 1

Seq Scan on store_sales_details s (cost=0.00..252,171.93 rows=2,903,731 width=55) (actual time=0.011..3,240.189 rows=2,904,899 loops=1)

67. 6.280 65,870.293 ↓ 1.5 13,216 1

Hash (cost=3,685,898.82..3,685,898.82 rows=9,044 width=116) (actual time=65,870.293..65,870.293 rows=13,216 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1819kB
68. 1,035.986 65,864.013 ↓ 1.5 13,216 1

Hash Right Join (cost=3,223,683.60..3,685,898.82 rows=9,044 width=116) (actual time=61,467.787..65,864.013 rows=13,216 loops=1)

  • Hash Cond: ((pbcl_1.bill_no)::text = (ssm.bill_no)::text)
69. 3,362.541 3,362.541 ↑ 1.0 7,474,211 1

Seq Scan on bill_claim pbcl_1 (cost=0.00..387,132.42 rows=7,481,148 width=29) (actual time=0.513..3,362.541 rows=7,474,211 loops=1)

  • Filter: (priority = 1)
  • Rows Removed by Filter: 48547
70. 11.747 61,465.486 ↓ 1.5 13,216 1

Hash (cost=3,223,397.67..3,223,397.67 rows=8,798 width=116) (actual time=61,465.486..61,465.486 rows=13,216 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1819kB
71. 25.878 61,453.739 ↓ 1.5 13,216 1

Gather (cost=183,776.32..3,223,397.67 rows=8,798 width=116) (actual time=8,917.709..61,453.739 rows=13,216 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
72. 4.519 61,427.861 ↓ 1.2 4,405 3 / 3

Hash Join (cost=182,776.32..3,221,517.87 rows=3,666 width=116) (actual time=8,899.233..61,427.861 rows=4,405 loops=3)

  • Hash Cond: (b_1.visit_type = bvn_1.visit_type)
73. 525.530 61,423.303 ↓ 1.2 4,405 3 / 3

Hash Join (cost=182,775.07..3,221,478.48 rows=3,666 width=114) (actual time=8,899.052..61,423.303 rows=4,405 loops=3)

  • Hash Cond: ((bc.charge_id)::text = (ssm.charge_id)::text)
74. 4,978.771 59,641.521 ↓ 1.2 154,528 3 / 3

Hash Join (cost=62,285.32..3,086,168.22 rows=130,810 width=101) (actual time=7,440.945..59,641.521 rows=154,528 loops=3)

  • Hash Cond: ((bc.bill_no)::text = (b_1.bill_no)::text)
75. 47,232.153 47,232.153 ↑ 1.3 14,651,689 3 / 3

Parallel Seq Scan on bill_charge bc (cost=0.00..2,975,797.19 rows=18,318,343 width=67) (actual time=0.090..47,232.153 rows=14,651,689 loops=3)

  • Filter: (status <> 'X'::bpchar)
  • Rows Removed by Filter: 772154
76. 82.278 7,430.597 ↓ 1.3 91,116 3 / 3

Hash (cost=60,031.28..60,031.28 rows=69,355 width=48) (actual time=7,430.597..7,430.597 rows=91,116 loops=3)

  • Buckets: 131072 Batches: 1 Memory Usage: 8321kB
77. 7,348.319 7,348.319 ↓ 1.3 91,116 3 / 3

Index Scan using bill_finalized_date_idx on bill b_1 (cost=0.56..60,031.28 rows=69,355 width=48) (actual time=0.681..7,348.319 rows=91,116 loops=3)

  • Index Cond: ((date(finalized_date) >= '2019-01-01'::date) AND (date(finalized_date) <= '2019-01-15'::date))
  • Filter: (is_tpa AND is_tpa AND (status <> 'X'::bpchar))
  • Rows Removed by Filter: 28745
78. 425.705 1,256.252 ↓ 1.0 1,297,395 3 / 3

Hash (cost=68,212.40..68,212.40 rows=1,296,780 width=33) (actual time=1,256.252..1,256.252 rows=1,297,395 loops=3)

  • Buckets: 1048576 Batches: 2 Memory Usage: 50737kB
79. 830.547 830.547 ↓ 1.0 1,297,395 3 / 3

Seq Scan on store_sales_main ssm (cost=0.00..68,212.40 rows=1,296,780 width=33) (actual time=0.030..830.547 rows=1,297,395 loops=3)

80. 0.008 0.039 ↑ 1.0 4 3 / 3

Hash (cost=1.12..1.12 rows=4 width=6) (actual time=0.038..0.039 rows=4 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
81. 0.031 0.031 ↑ 1.0 4 3 / 3

Seq Scan on visit_type_names bvn_1 (cost=0.00..1.12 rows=4 width=6) (actual time=0.030..0.031 rows=4 loops=3)

82. 10.795 30.194 ↓ 1.0 65,509 1

Hash (cost=5,354.70..5,354.70 rows=65,490 width=63) (actual time=30.194..30.194 rows=65,509 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 6732kB
83. 19.399 19.399 ↓ 1.0 65,509 1

Seq Scan on store_item_details m (cost=0.00..5,354.70 rows=65,490 width=63) (actual time=0.011..19.399 rows=65,509 loops=1)

84. 5,566.992 26,046.575 ↓ 1.0 8,732,360 1

Hash (cost=669,078.97..669,078.97 rows=8,731,099 width=53) (actual time=26,046.575..26,046.575 rows=8,732,360 loops=1)

  • Buckets: 1048576 Batches: 16 Memory Usage: 54599kB
85. 20,479.583 20,479.583 ↓ 1.0 8,732,360 1

Seq Scan on patient_registration pr_1 (cost=0.00..669,078.97 rows=8,731,099 width=53) (actual time=0.337..20,479.583 rows=8,732,360 loops=1)

86. 3,269.253 3,269.253 ↑ 1.0 3,005,078 1

Index Only Scan using patient_details_pkey on patient_details pd_1 (cost=0.43..169,860.58 rows=3,015,916 width=15) (actual time=0.042..3,269.253 rows=3,005,078 loops=1)

  • Heap Fetches: 822003
87. 0.007 0.035 ↑ 1.0 1 1

Hash (cost=5.50..5.50 rows=1 width=22) (actual time=0.035..0.035 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
88. 0.028 0.028 ↑ 1.0 1 1

Seq Scan on hospital_center_master hcm_1 (cost=0.00..5.50 rows=1 width=22) (actual time=0.023..0.028 rows=1 loops=1)

  • Filter: ((center_name)::text = 'NMCAbuDhabi'::text)
  • Rows Removed by Filter: 45
89. 0.323 0.644 ↑ 1.0 1,620 1

Hash (cost=76.60..76.60 rows=1,620 width=29) (actual time=0.644..0.644 rows=1,620 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 115kB
90. 0.321 0.321 ↑ 1.0 1,620 1

Seq Scan on organization_details od_1 (cost=0.00..76.60 rows=1,620 width=29) (actual time=0.017..0.321 rows=1,620 loops=1)

91. 0.141 0.310 ↑ 1.0 674 1

Hash (cost=53.22..53.22 rows=674 width=34) (actual time=0.310..0.310 rows=674 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
92. 0.169 0.169 ↑ 1.0 674 1

Seq Scan on tpa_master ptpa_1 (cost=0.00..53.22 rows=674 width=34) (actual time=0.008..0.169 rows=674 loops=1)

93. 0.153 0.310 ↑ 1.0 761 1

Hash (cost=35.83..35.83 rows=761 width=33) (actual time=0.310..0.310 rows=761 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 57kB
94. 0.157 0.157 ↑ 1.0 761 1

Seq Scan on insurance_company_master picm_1 (cost=0.00..35.83 rows=761 width=33) (actual time=0.014..0.157 rows=761 loops=1)

95.          

SubPlan (for Hash Left Join)

96. 4.592 119.392 ↑ 1.0 1 4,592

Aggregate (cost=4.48..4.51 rows=1 width=32) (actual time=0.026..0.026 rows=1 loops=4,592)

97. 114.800 114.800 ↑ 1.0 1 4,592

Index Scan using sales_claim_sale_item_idx on sales_claim_details scd1 (cost=0.43..4.47 rows=1 width=7) (actual time=0.024..0.025 rows=1 loops=4,592)

  • Index Cond: (sale_item_id = s.sale_item_id)
98. 4.592 13.776 ↑ 1.0 1 4,592

Aggregate (cost=4.47..4.50 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=4,592)

99. 9.184 9.184 ↑ 1.0 1 4,592

Index Scan using sales_claim_sale_item_idx on sales_claim_details scd1_1 (cost=0.43..4.47 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=4,592)

  • Index Cond: (sale_item_id = s.sale_item_id)