explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E8nI

Settings
# exclusive inclusive rows x rows loops node
1. 349.765 2,202.886 ↑ 1,602.0 1 1

Gather (cost=151,743.03..161,664.38 rows=1,602 width=1,856) (actual time=2,202.883..2,202.886 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.199 1,853.121 ↓ 0.0 0 3 / 3

Merge Left Join (cost=150,743.03..160,364.08 rows=668 width=1,856) (actual time=1,853.121..1,853.121 rows=0 loops=3)

  • Merge Cond: (t.treatment_id = thhp.treatment_id)
3. 0.022 1,779.980 ↓ 0.0 0 3 / 3

Sort (cost=121,328.98..121,330.65 rows=668 width=1,445) (actual time=1,779.980..1,779.980 rows=0 loops=3)

  • Sort Key: t.treatment_id
  • Sort Method: quicksort Memory: 25kB
4. 0.005 1,779.958 ↓ 0.0 0 3 / 3

Hash Left Join (cost=119,009.84..121,297.63 rows=668 width=1,445) (actual time=1,779.957..1,779.958 rows=0 loops=3)

  • Hash Cond: ("*SELECT* 1".profession_id = rhpprof.profession_id)
5. 0.001 1,779.359 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=118,844.91..121,124.27 rows=668 width=1,440) (actual time=1,779.358..1,779.359 rows=0 loops=3)

6. 0.004 1,779.356 ↓ 0.0 0 3 / 3

Hash Left Join (cost=118,844.49..118,877.28 rows=668 width=1,418) (actual time=1,779.355..1,779.356 rows=0 loops=3)

  • Hash Cond: ("*SELECT* 1".health_professional_id = rhp.health_professional_id)
7. 0.004 1,779.116 ↓ 0.0 0 3 / 3

Hash Left Join (cost=118,774.81..118,799.17 rows=668 width=1,414) (actual time=1,779.116..1,779.116 rows=0 loops=3)

  • Hash Cond: ("*SELECT* 1".health_facility_id = rhf.health_facility_id)
8. 0.003 1,779.091 ↓ 0.0 0 3 / 3

Hash Left Join (cost=118,765.56..118,781.51 rows=668 width=1,382) (actual time=1,779.091..1,779.091 rows=0 loops=3)

  • Hash Cond: (pp.repassed_by = rep_u.user_id)
9. 0.002 1,778.709 ↓ 0.0 0 3 / 3

Merge Left Join (cost=116,045.49..116,058.93 rows=668 width=1,360) (actual time=1,778.708..1,778.709 rows=0 loops=3)

  • Merge Cond: (("*SELECT* 1".health_insurance_company_id = phhicp.health_insurance_company_id) AND ("*SELECT* 1".health_insurance_company_plan_id = phhicp.health_insurance_company_plan_id))
  • Join Filter: (phhicp.patient_id = "*SELECT* 1".patient_id)
10. 0.001 1,778.701 ↓ 0.0 0 3 / 3

Merge Left Join (cost=116,037.05..116,047.12 rows=668 width=1,348) (actual time=1,778.701..1,778.701 rows=0 loops=3)

  • Merge Cond: ("*SELECT* 1".health_insurance_company_id = hic.health_insurance_company_id)
11. 0.005 1,778.689 ↓ 0.0 0 3 / 3

Merge Left Join (cost=116,033.67..116,039.78 rows=668 width=1,329) (actual time=1,778.689..1,778.689 rows=0 loops=3)

  • Merge Cond: (("*SELECT* 1".health_insurance_company_id = hicp.health_insurance_company_id) AND ("*SELECT* 1".health_insurance_company_plan_id = hicp.health_insurance_company_plan_id))
12. 0.007 1,778.642 ↓ 0.0 0 3 / 3

Sort (cost=116,025.13..116,026.80 rows=668 width=1,310) (actual time=1,778.642..1,778.642 rows=0 loops=3)

  • Sort Key: "*SELECT* 1".health_insurance_company_id, "*SELECT* 1".health_insurance_company_plan_id
  • Sort Method: quicksort Memory: 25kB
13. 0.004 1,778.635 ↓ 0.0 0 3 / 3

Hash Left Join (cost=65,107.74..115,993.78 rows=668 width=1,310) (actual time=1,744.199..1,778.635 rows=0 loops=3)

  • Hash Cond: ("*SELECT* 1".patient_id = p.patient_id)
14. 0.003 1,778.626 ↓ 0.0 0 3 / 3

Hash Left Join (cost=65,090.85..115,967.72 rows=668 width=1,284) (actual time=1,744.191..1,778.626 rows=0 loops=3)

  • Hash Cond: ("*SELECT* 1".created_by = ttu.user_id)
15. 0.003 1,778.240 ↓ 0.0 0 3 / 3

Hash Left Join (cost=62,370.79..113,238.47 rows=668 width=1,258) (actual time=1,743.805..1,778.240 rows=0 loops=3)

  • Hash Cond: ((rhpp.gloss_over_code)::text = (it38.code)::text)
16. 0.005 1,778.174 ↓ 0.0 0 3 / 3

Hash Left Join (cost=62,350.13..113,209.38 rows=668 width=1,203) (actual time=1,743.739..1,778.174 rows=0 loops=3)

  • Hash Cond: ((rec.recourse_id = rhpp.recourse_id) AND (pp.procedure_performed_id = rhpp.procedure_performed_id))
17. 0.005 1,776.833 ↓ 0.0 0 3 / 3

Hash Left Join (cost=62,002.41..112,853.30 rows=668 width=1,100) (actual time=1,742.399..1,776.833 rows=0 loops=3)

  • Hash Cond: (lot_map.recourse_id = rec.recourse_id)
18. 0.002 1,776.817 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=61,998.67..112,841.13 rows=668 width=1,100) (actual time=1,742.383..1,776.817 rows=0 loops=3)

19. 0.001 1,776.815 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=61,998.39..112,598.14 rows=668 width=1,088) (actual time=1,742.381..1,776.815 rows=0 loops=3)

20. 0.003 1,776.814 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=61,998.11..112,361.13 rows=668 width=1,080) (actual time=1,742.380..1,776.814 rows=0 loops=3)

21. 8.329 1,776.809 ↓ 0.0 0 3 / 3

Hash Join (cost=61,997.83..112,158.61 rows=668 width=1,080) (actual time=1,742.375..1,776.809 rows=0 loops=3)

  • Hash Cond: (t.treatment_id = "*SELECT* 1".treatment_id)
22. 26.658 1,768.408 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=61,922.08..98,785.67 rows=73,327 width=954) (actual time=1,212.364..1,768.408 rows=58,661 loops=3)

  • Hash Cond: (t.treatment_status_id = ts.treatment_status_id)
23. 22.649 1,741.724 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=61,920.99..98,021.52 rows=73,327 width=836) (actual time=1,212.321..1,741.724 rows=58,661 loops=3)

  • Hash Cond: (twl.wait_list_created_by = utwlr.user_id)
24. 29.046 1,717.930 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=59,200.93..94,293.21 rows=73,327 width=810) (actual time=1,211.164..1,717.930 rows=58,661 loops=3)

  • Hash Cond: (t.treatment_model_id = tm.treatment_model_id)
25. 148.655 1,688.829 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=59,198.44..93,282.48 rows=73,327 width=668) (actual time=1,211.090..1,688.829 rows=58,661 loops=3)

  • Hash Cond: (pp.procedure_auth_id = pa.procedure_auth_id)
26. 22.153 1,204.902 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=38,627.58..58,519.89 rows=73,327 width=642) (actual time=874.795..1,204.902 rows=58,661 loops=3)

  • Hash Cond: (t.treatment_id = twl.treatment_id)
27. 24.969 1,182.733 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=38,581.15..57,547.71 rows=73,327 width=638) (actual time=874.768..1,182.733 rows=58,661 loops=3)

  • Hash Cond: (pp.procedure_status_id = ps.procedure_status_id)
28. 20.068 1,157.745 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=38,579.99..56,713.76 rows=73,327 width=550) (actual time=874.732..1,157.745 rows=58,661 loops=3)

  • Hash Cond: (pp.procedure_performed_amb_id = ppamb.procedure_performed_amb_id)
29. 32.343 1,137.669 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=38,555.37..55,763.39 rows=73,327 width=470) (actual time=874.713..1,137.669 rows=58,661 loops=3)

  • Hash Cond: ((pp.procedure_code)::text = (proc.procedure_code)::text)
30. 106.390 1,105.194 ↑ 1.3 58,661 3 / 3

Hash Left Join (cost=38,549.51..54,749.28 rows=73,327 width=292) (actual time=874.540..1,105.194 rows=58,661 loops=3)

  • Hash Cond: (pp.procedure_performed_id = ppp.procedure_performed_id)
31. 93.775 245.490 ↑ 1.3 58,661 3 / 3

Hash Join (cost=7,863.72..17,787.74 rows=73,327 width=159) (actual time=121.057..245.490 rows=58,661 loops=3)

  • Hash Cond: (pp.treatment_id = t.treatment_id)
32. 30.999 30.999 ↑ 1.3 58,661 3 / 3

Parallel Seq Scan on procedure_performed pp (cost=0.00..5,127.27 rows=73,327 width=72) (actual time=0.031..30.999 rows=58,661 loops=3)

33. 65.869 120.716 ↑ 1.0 157,321 3 / 3

Hash (cost=3,746.21..3,746.21 rows=157,321 width=87) (actual time=120.716..120.716 rows=157,321 loops=3)

  • Buckets: 32,768 Batches: 8 Memory Usage: 1,642kB
34. 54.847 54.847 ↑ 1.0 157,321 3 / 3

Seq Scan on treatment t (cost=0.00..3,746.21 rows=157,321 width=87) (actual time=0.023..54.847 rows=157,321 loops=3)

35. 53.838 753.314 ↑ 1.0 100,240 3 / 3

Hash (cost=27,376.63..27,376.63 rows=100,253 width=137) (actual time=753.314..753.314 rows=100,240 loops=3)

  • Buckets: 32,768 Batches: 8 Memory Usage: 1,504kB
36. 14.472 699.476 ↑ 1.0 100,240 3 / 3

Subquery Scan on ppp (cost=22,363.98..27,376.63 rows=100,253 width=137) (actual time=143.750..699.476 rows=100,240 loops=3)

37. 524.920 685.004 ↑ 1.0 100,240 3 / 3

GroupAggregate (cost=22,363.98..26,374.10 rows=100,253 width=137) (actual time=143.748..685.004 rows=100,240 loops=3)

  • Group Key: ppp_1.procedure_performed_id
38. 97.125 160.084 ↑ 1.0 100,253 3 / 3

Sort (cost=22,363.98..22,614.61 rows=100,253 width=133) (actual time=143.676..160.084 rows=100,253 loops=3)

  • Sort Key: ppp_1.procedure_performed_id
  • Sort Method: external merge Disk: 5,624kB
39. 21.071 62.959 ↑ 1.0 100,253 3 / 3

Hash Left Join (cost=2,721.22..7,179.82 rows=100,253 width=133) (actual time=1.507..62.959 rows=100,253 loops=3)

  • Hash Cond: (ppp_1.procedure_payment_type_id = ppt.procedure_payment_type_id)
40. 30.117 41.865 ↑ 1.0 100,253 3 / 3

Hash Left Join (cost=2,720.07..6,040.07 rows=100,253 width=45) (actual time=1.470..41.865 rows=100,253 loops=3)

  • Hash Cond: (ppp_1.created_by = u.user_id)
41. 10.312 10.312 ↑ 1.0 100,253 3 / 3

Seq Scan on procedure_performed_payment ppp_1 (cost=0.00..1,941.53 rows=100,253 width=23) (actual time=0.021..10.312 rows=100,253 loops=3)

42. 0.116 1.436 ↑ 1.0 422 3 / 3

Hash (cost=2,714.79..2,714.79 rows=422 width=30) (actual time=1.436..1.436 rows=422 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 32kB
43. 0.000 1.320 ↑ 1.0 422 3 / 3

Nested Loop Left Join (cost=0.42..2,714.79 rows=422 width=30) (actual time=0.032..1.320 rows=422 loops=3)

44. 0.079 0.079 ↑ 1.0 422 3 / 3

Seq Scan on "user" u (cost=0.00..15.22 rows=422 width=8) (actual time=0.015..0.079 rows=422 loops=3)

45. 1.266 1.266 ↑ 1.0 1 1,266 / 3

Index Scan using person_pkey on person p_1 (cost=0.42..6.40 rows=1 width=30) (actual time=0.003..0.003 rows=1 loops=1,266)

  • Index Cond: (person_id = u.person_id)
46. 0.005 0.023 ↑ 1.0 7 3 / 3

Hash (cost=1.07..1.07 rows=7 width=92) (actual time=0.023..0.023 rows=7 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
47. 0.018 0.018 ↑ 1.0 7 3 / 3

Seq Scan on procedure_payment_type ppt (cost=0.00..1.07 rows=7 width=92) (actual time=0.016..0.018 rows=7 loops=3)

48. 0.031 0.132 ↑ 1.0 84 3 / 3

Hash (cost=4.80..4.80 rows=84 width=187) (actual time=0.132..0.132 rows=84 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 18kB
49. 0.040 0.101 ↑ 1.0 84 3 / 3

Hash Left Join (cost=1.09..4.80 rows=84 width=187) (actual time=0.067..0.101 rows=84 loops=3)

  • Hash Cond: (proc.procedure_type_id = pt.procedure_type_id)
50. 0.045 0.045 ↑ 1.0 84 3 / 3

Seq Scan on procedure proc (cost=0.00..2.84 rows=84 width=69) (actual time=0.037..0.045 rows=84 loops=3)

51. 0.003 0.016 ↑ 1.0 4 3 / 3

Hash (cost=1.04..1.04 rows=4 width=122) (actual time=0.016..0.016 rows=4 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
52. 0.013 0.013 ↑ 1.0 4 3 / 3

Seq Scan on procedure_type pt (cost=0.00..1.04 rows=4 width=122) (actual time=0.012..0.013 rows=4 loops=3)

53. 0.000 0.008 ↓ 0.0 0 3 / 3

Hash (cost=16.50..16.50 rows=650 width=88) (actual time=0.008..0.008 rows=0 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
54. 0.008 0.008 ↓ 0.0 0 3 / 3

Seq Scan on procedure_performed_amb ppamb (cost=0.00..16.50 rows=650 width=88) (actual time=0.008..0.008 rows=0 loops=3)

55. 0.007 0.019 ↑ 1.0 7 3 / 3

Hash (cost=1.07..1.07 rows=7 width=92) (actual time=0.019..0.019 rows=7 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
56. 0.012 0.012 ↑ 1.0 7 3 / 3

Seq Scan on procedure_status ps (cost=0.00..1.07 rows=7 width=92) (actual time=0.011..0.012 rows=7 loops=3)

57. 0.000 0.016 ↓ 0.0 0 3 / 3

Hash (cost=43.93..43.93 rows=200 width=8) (actual time=0.016..0.016 rows=0 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
58. 0.001 0.016 ↓ 0.0 0 3 / 3

Subquery Scan on twl (cost=39.28..43.93 rows=200 width=8) (actual time=0.016..0.016 rows=0 loops=3)

59. 0.001 0.015 ↓ 0.0 0 3 / 3

Unique (cost=39.28..41.93 rows=200 width=12) (actual time=0.015..0.015 rows=0 loops=3)

60. 0.007 0.014 ↓ 0.0 0 3 / 3

Sort (cost=39.28..40.61 rows=530 width=12) (actual time=0.014..0.014 rows=0 loops=3)

  • Sort Key: treatment_wait_list.treatment_id, treatment_wait_list.wait_list_patient_arrival
  • Sort Method: quicksort Memory: 25kB
61. 0.007 0.007 ↓ 0.0 0 3 / 3

Seq Scan on treatment_wait_list (cost=0.00..15.30 rows=530 width=12) (actual time=0.007..0.007 rows=0 loops=3)

62. 57.360 335.272 ↑ 1.0 168,621 3 / 3

Hash (cost=17,310.10..17,310.10 rows=168,621 width=30) (actual time=335.272..335.272 rows=168,621 loops=3)

  • Buckets: 65,536 Batches: 4 Memory Usage: 2,966kB
63. 113.636 277.912 ↑ 1.0 168,621 3 / 3

Hash Right Join (cost=6,232.97..17,310.10 rows=168,621 width=30) (actual time=87.469..277.912 rows=168,621 loops=3)

  • Hash Cond: (s.procedure_auth_id = pa.procedure_auth_id)
64. 77.214 77.214 ↑ 1.0 138,481 3 / 3

Seq Scan on sadt s (cost=0.00..6,985.81 rows=138,481 width=12) (actual time=0.031..77.214 rows=138,481 loops=3)

65. 49.621 87.062 ↑ 1.0 168,621 3 / 3

Hash (cost=3,136.21..3,136.21 rows=168,621 width=22) (actual time=87.062..87.062 rows=168,621 loops=3)

  • Buckets: 65,536 Batches: 4 Memory Usage: 2,488kB
66. 37.441 37.441 ↑ 1.0 168,621 3 / 3

Seq Scan on procedure_auth pa (cost=0.00..3,136.21 rows=168,621 width=22) (actual time=0.016..37.441 rows=168,621 loops=3)

67. 0.005 0.055 ↑ 1.0 9 3 / 3

Hash (cost=2.37..2.37 rows=9 width=146) (actual time=0.055..0.055 rows=9 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
68. 0.014 0.050 ↑ 1.0 9 3 / 3

Hash Left Join (cost=1.18..2.37 rows=9 width=146) (actual time=0.046..0.050 rows=9 loops=3)

  • Hash Cond: (tm.treatment_seq_id = tseq.treatment_seq_id)
69. 0.018 0.018 ↑ 1.0 9 3 / 3

Seq Scan on treatment_model tm (cost=0.00..1.09 rows=9 width=126) (actual time=0.017..0.018 rows=9 loops=3)

70. 0.007 0.018 ↑ 1.0 8 3 / 3

Hash (cost=1.08..1.08 rows=8 width=28) (actual time=0.018..0.018 rows=8 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
71. 0.011 0.011 ↑ 1.0 8 3 / 3

Seq Scan on treatment_seq tseq (cost=0.00..1.08 rows=8 width=28) (actual time=0.009..0.011 rows=8 loops=3)

72. 0.112 1.145 ↑ 1.0 422 3 / 3

Hash (cost=2,714.79..2,714.79 rows=422 width=30) (actual time=1.145..1.145 rows=422 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 32kB
73. 0.132 1.033 ↑ 1.0 422 3 / 3

Nested Loop Left Join (cost=0.42..2,714.79 rows=422 width=30) (actual time=0.020..1.033 rows=422 loops=3)

74. 0.057 0.057 ↑ 1.0 422 3 / 3

Seq Scan on "user" utwlr (cost=0.00..15.22 rows=422 width=8) (actual time=0.007..0.057 rows=422 loops=3)

75. 0.844 0.844 ↑ 1.0 1 1,266 / 3

Index Scan using person_pkey on person petwlr (cost=0.42..6.40 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=1,266)

  • Index Cond: (person_id = utwlr.person_id)
76. 0.005 0.026 ↑ 1.0 4 3 / 3

Hash (cost=1.04..1.04 rows=4 width=122) (actual time=0.026..0.026 rows=4 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
77. 0.021 0.021 ↑ 1.0 4 3 / 3

Seq Scan on treatment_status ts (cost=0.00..1.04 rows=4 width=122) (actual time=0.019..0.021 rows=4 loops=3)

78. 0.005 0.072 ↑ 1,432.0 1 3 / 3

Hash (cost=57.85..57.85 rows=1,432 width=134) (actual time=0.072..0.072 rows=1 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
79. 0.001 0.067 ↑ 1,432.0 1 3 / 3

Append (cost=0.84..57.85 rows=1,432 width=134) (actual time=0.059..0.067 rows=1 loops=3)

80. 0.001 0.060 ↑ 2.0 1 3 / 3

Subquery Scan on *SELECT* 1 (cost=0.84..27.23 rows=2 width=83) (actual time=0.058..0.060 rows=1 loops=3)

81. 0.009 0.059 ↑ 2.0 1 3 / 3

Nested Loop Left Join (cost=0.84..27.21 rows=2 width=603) (actual time=0.057..0.059 rows=1 loops=3)

82. 0.022 0.022 ↑ 2.0 1 3 / 3

Index Scan using request_patient_id_idx on request r_aux (cost=0.42..10.32 rows=2 width=43) (actual time=0.022..0.022 rows=1 loops=3)

  • Index Cond: (patient_id = 7,845)
83. 0.028 0.028 ↑ 1.0 1 3 / 3

Index Scan using treatment_request_id_idx on treatment t_aux (cost=0.42..8.44 rows=1 width=12) (actual time=0.028..0.028 rows=1 loops=3)

  • Index Cond: (request_id = r_aux.request_id)
84. 0.000 0.006 ↓ 0.0 0 3 / 3

Subquery Scan on *SELECT* 2 (cost=0.27..30.61 rows=1,430 width=134) (actual time=0.006..0.006 rows=0 loops=3)

85. 0.000 0.006 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=0.27..16.31 rows=1,430 width=654) (actual time=0.006..0.006 rows=0 loops=3)

86. 0.006 0.006 ↓ 0.0 0 3 / 3

Index Scan using schedule_patient_id_idx on schedule s_aux (cost=0.14..8.16 rows=1 width=98) (actual time=0.006..0.006 rows=0 loops=3)

  • Index Cond: (patient_id = 7,845)
87. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using treatment_schedule_id_idx on treatment t_aux_1 (cost=0.12..8.14 rows=1 width=8) (never executed)

  • Index Cond: (schedule_id = s_aux.schedule_id)
88. 0.002 0.002 ↓ 0.0 0 1 / 3

Index Scan using sadt_lot_map_mv_sadt_lot_id on sadt_lot_map_mv lot_map_aux (cost=0.28..0.30 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (sadt_lot_id = s.sadt_lot_id)
89. 0.000 0.000 ↓ 0.0 0 1 / 3

Index Scan using sadt_lot_map_mv_sadt_lot_id on sadt_lot_map_mv lot_map (cost=0.28..0.35 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (sadt_lot_id = lot_map_aux.root_id)
90. 0.000 0.000 ↓ 0.0 0 1 / 3

Index Scan using sadt_lot_pkey on sadt_lot sl (cost=0.28..0.36 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (sadt_lot_id = lot_map.sadt_lot_id)
91. 0.003 0.011 ↑ 1.0 77 1 / 3

Hash (cost=2.77..2.77 rows=77 width=4) (actual time=0.034..0.034 rows=77 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
92. 0.008 0.008 ↑ 1.0 77 1 / 3

Seq Scan on recourse rec (cost=0.00..2.77 rows=77 width=4) (actual time=0.014..0.024 rows=77 loops=1)

93. 0.713 1.336 ↑ 1.0 7,749 1 / 3

Hash (cost=231.49..231.49 rows=7,749 width=111) (actual time=4.007..4.007 rows=7,749 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 1,175kB
94. 0.623 0.623 ↑ 1.0 7,749 1 / 3

Seq Scan on recourse_has_procedure_performed rhpp (cost=0.00..231.49 rows=7,749 width=111) (actual time=0.009..1.869 rows=7,749 loops=1)

95. 0.034 0.063 ↑ 1.0 607 1 / 3

Hash (cost=13.07..13.07 rows=607 width=60) (actual time=0.189..0.189 rows=607 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 63kB
96. 0.029 0.029 ↑ 1.0 607 1 / 3

Seq Scan on import_tuss_38 it38 (cost=0.00..13.07 rows=607 width=60) (actual time=0.009..0.087 rows=607 loops=1)

97. 0.027 0.383 ↑ 1.0 422 1 / 3

Hash (cost=2,714.79..2,714.79 rows=422 width=30) (actual time=1.148..1.148 rows=422 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 32kB
98. 0.056 0.356 ↑ 1.0 422 1 / 3

Nested Loop Left Join (cost=0.42..2,714.79 rows=422 width=30) (actual time=0.011..1.068 rows=422 loops=1)

99. 0.019 0.019 ↑ 1.0 422 1 / 3

Seq Scan on "user" ttu (cost=0.00..15.22 rows=422 width=8) (actual time=0.007..0.056 rows=422 loops=1)

100. 0.281 0.281 ↑ 1.0 1 422 / 3

Index Scan using person_pkey on person ttpe (cost=0.42..6.40 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=422)

  • Index Cond: (person_id = ttu.person_id)
101. 0.000 0.005 ↑ 1.0 1 1 / 3

Hash (cost=16.87..16.87 rows=1 width=30) (actual time=0.015..0.015 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
102. 0.001 0.005 ↑ 1.0 1 1 / 3

Nested Loop Left Join (cost=0.83..16.87 rows=1 width=30) (actual time=0.013..0.014 rows=1 loops=1)

103. 0.003 0.003 ↑ 1.0 1 1 / 3

Index Scan using patient_pkey on patient p (cost=0.42..8.44 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: (patient_id = 7,845)
104. 0.001 0.001 ↑ 1.0 1 1 / 3

Index Scan using person_pkey on person ppe (cost=0.42..8.44 rows=1 width=30) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (person_id = p.person_id)
105. 0.032 0.042 ↑ 4.8 30 1 / 3

Sort (cost=8.55..8.91 rows=143 width=27) (actual time=0.125..0.127 rows=30 loops=1)

  • Sort Key: hicp.health_insurance_company_id, hicp.health_insurance_company_plan_id
  • Sort Method: quicksort Memory: 35kB
106. 0.011 0.011 ↑ 1.0 143 1 / 3

Seq Scan on health_insurance_company_plan hicp (cost=0.00..3.43 rows=143 width=27) (actual time=0.015..0.032 rows=143 loops=1)

107. 0.006 0.011 ↑ 5.5 11 1 / 3

Sort (cost=3.37..3.52 rows=60 width=23) (actual time=0.032..0.032 rows=11 loops=1)

  • Sort Key: hic.health_insurance_company_id
  • Sort Method: quicksort Memory: 29kB
108. 0.005 0.005 ↑ 1.0 60 1 / 3

Seq Scan on health_insurance_company hic (cost=0.00..1.60 rows=60 width=23) (actual time=0.009..0.015 rows=60 loops=1)

109. 0.001 0.006 ↑ 1.0 1 1 / 3

Sort (cost=8.45..8.45 rows=1 width=24) (actual time=0.017..0.017 rows=1 loops=1)

  • Sort Key: phhicp.health_insurance_company_id, phhicp.health_insurance_company_plan_id
  • Sort Method: quicksort Memory: 25kB
110. 0.004 0.004 ↑ 1.0 1 1 / 3

Index Scan using patient_has_health_insurance_company_plan_pkey on patient_has_health_insurance_company_plan phhicp (cost=0.42..8.44 rows=1 width=24) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: (patient_id = 7,845)
111. 0.028 0.379 ↑ 1.0 422 1 / 3

Hash (cost=2,714.79..2,714.79 rows=422 width=30) (actual time=1.136..1.136 rows=422 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 32kB
112. 0.048 0.350 ↑ 1.0 422 1 / 3

Nested Loop Left Join (cost=0.42..2,714.79 rows=422 width=30) (actual time=0.012..1.051 rows=422 loops=1)

113. 0.021 0.021 ↑ 1.0 422 1 / 3

Seq Scan on "user" rep_u (cost=0.00..15.22 rows=422 width=8) (actual time=0.006..0.064 rows=422 loops=1)

114. 0.281 0.281 ↑ 1.0 1 422 / 3

Index Scan using person_pkey on person rep_p (cost=0.42..6.40 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=422)

  • Index Cond: (person_id = rep_u.person_id)
115. 0.009 0.021 ↑ 1.0 189 1 / 3

Hash (cost=6.89..6.89 rows=189 width=36) (actual time=0.063..0.063 rows=189 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 21kB
116. 0.012 0.012 ↑ 1.0 189 1 / 3

Seq Scan on health_facility rhf (cost=0.00..6.89 rows=189 width=36) (actual time=0.010..0.036 rows=189 loops=1)

117. 0.128 0.236 ↓ 1.0 2,387 1 / 3

Hash (cost=39.86..39.86 rows=2,386 width=8) (actual time=0.709..0.709 rows=2,387 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 126kB
118. 0.109 0.109 ↓ 1.0 2,387 1 / 3

Seq Scan on health_professional rhp (cost=0.00..39.86 rows=2,386 width=8) (actual time=0.011..0.326 rows=2,387 loops=1)

119. 0.002 0.002 ↑ 1.0 1 1 / 3

Index Scan using person_pkey on person rhppe (cost=0.42..3.36 rows=1 width=30) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (person_id = rhp.person_id)
120. 0.316 0.594 ↓ 1.0 5,509 1 / 3

Hash (cost=96.08..96.08 rows=5,508 width=13) (actual time=1.781..1.781 rows=5,509 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 322kB
121. 0.278 0.278 ↓ 1.0 5,509 1 / 3

Seq Scan on profession rhpprof (cost=0.00..96.08 rows=5,508 width=13) (actual time=0.009..0.833 rows=5,509 loops=1)

122. 6.112 72.942 ↑ 17.4 8,387 1 / 3

GroupAggregate (cost=29,414.05..37,098.81 rows=146,124 width=109) (actual time=199.386..218.826 rows=8,387 loops=1)

  • Group Key: thhp.treatment_id
123. 37.388 66.830 ↑ 18.8 9,204 1 / 3

Sort (cost=29,414.05..29,846.98 rows=173,174 width=42) (actual time=199.361..200.491 rows=9,204 loops=1)

  • Sort Key: thhp.treatment_id
  • Sort Method: external sort Disk: 8,152kB
124. 15.158 29.443 ↑ 1.0 173,174 1 / 3

Hash Left Join (cost=3,458.92..9,015.80 rows=173,174 width=42) (actual time=27.610..88.328 rows=173,174 loops=1)

  • Hash Cond: (thhp.health_professional_id = php.health_professional_id)
125. 5.091 5.091 ↑ 1.0 173,174 1 / 3

Seq Scan on treatment_has_health_professional thhp (cost=0.00..3,175.74 rows=173,174 width=16) (actual time=0.009..15.273 rows=173,174 loops=1)

126. 0.188 9.194 ↓ 1.0 2,387 1 / 3

Hash (cost=3,429.09..3,429.09 rows=2,386 width=30) (actual time=27.581..27.581 rows=2,387 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 174kB
127. 4.609 9.005 ↓ 1.0 2,387 1 / 3

Hash Right Join (cost=69.69..3,429.09 rows=2,386 width=30) (actual time=0.636..27.016 rows=2,387 loops=1)

  • Hash Cond: (phppe.person_id = php.person_id)
128. 4.190 4.190 ↓ 1.0 110,386 1 / 3

Seq Scan on person phppe (cost=0.00..2,921.67 rows=110,367 width=30) (actual time=0.008..12.570 rows=110,386 loops=1)

129. 0.107 0.206 ↓ 1.0 2,387 1 / 3

Hash (cost=39.86..39.86 rows=2,386 width=8) (actual time=0.619..0.619 rows=2,387 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 126kB
130. 0.099 0.099 ↓ 1.0 2,387 1 / 3

Seq Scan on health_professional php (cost=0.00..39.86 rows=2,386 width=8) (actual time=0.013..0.298 rows=2,387 loops=1)

Planning time : 18.244 ms
Execution time : 2,209.850 ms