explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ttGc

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 5,067.071 ↑ 1.0 25 1

Limit (cost=186,446.62..186,446.68 rows=25 width=570) (actual time=5,067.067..5,067.071 rows=25 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, caseinitgo9_.name, caseinitgo9_.id, medicalcas18_.uid, medicalcas18_.open_date, diagnosis12_.name, diagnosis12_.code, casediagno10_.note, individual4_.surname, individual4_.name, individual4_.patr_name, (get_ (...)
  • Buffers: shared hit=5313878
  • cant.VenereologicalProfile'::text)
2.          

Initplan (forLimit)

3. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=13.71..83.72 rows=1 width=0) (never executed)

  • Hash Cond: (roleelemen23_.method_id = securityme25_.id)
4. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.40..74.77 rows=168 width=4) (never executed)

  • Output: roleelemen23_.method_id
5. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ak_userrole on public.sec_user_role userrole24_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: userrole24_.user_id, userrole24_.role_id
  • Index Cond: (userrole24_.user_id = 12795)
  • Heap Fetches: 0
6. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.sec_role_element roleelemen23_ (cost=5.12..65.39 rows=108 width=8) (never executed)

  • Output: roleelemen23_.id, roleelemen23_.obj_group_id, roleelemen23_.property_id, roleelemen23_.role_id, roleelemen23_.method_id, roleelemen23_.aud_who, roleelemen23_.aud_when, roleelemen23_.aud_source, roleelemen23_.aud_who_create, ro (...)
  • Recheck Cond: (roleelemen23_.role_id = userrole24_.role_id)
7. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on sec_role_element_role_id_idx (cost=0.00..5.09 rows=108 width=0) (never executed)

  • Index Cond: (roleelemen23_.role_id = userrole24_.role_id)
8. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.29..8.29 rows=1 width=4) (never executed)

  • Output: securityme25_.id
9. 0.000 0.000 ↓ 0.0 0

Index Scan using sec_class_method_code_ak on public.sec_class_method securityme25_ (cost=0.27..8.29 rows=1 width=4) (never executed)

  • Output: securityme25_.id
  • Index Cond: ((securityme25_.code)::text = 'SocialSignificant.NarcologicProfile'::text)
10. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.73..26.09 rows=1 width=0) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.44..17.77 rows=1 width=4) (never executed)

  • Output: partyuser27_.id
12. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.16..17.41 rows=1 width=8) (never executed)

  • Output: position28_.department_id, partyuser27_.id
13. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.86..17.05 rows=1 width=8) (never executed)

  • Output: employeeto26_.position_id, partyuser27_.id
14. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.62 rows=1 width=8) (never executed)

  • Output: partyuser27_.id, employee30_.id
15. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sec_user_party on public.sec_user_party partyuser27_ (cost=0.29..8.30 rows=1 width=8) (never executed)

  • Output: partyuser27_.id, partyuser27_.party_id, partyuser27_.aud_who, partyuser27_.aud_when, partyuser27_.aud_source, partyuser27_.aud_who_create, partyuser27_.aud_when_create, partyuser27_.aud_source_create
  • Index Cond: (partyuser27_.id = 12795)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_individual_id_idx on public.pim_employee employee30_ (cost=0.29..8.31 rows=1 width=8) (never executed)

  • Output: employee30_.id, employee30_.note, employee30_.number, employee30_.photo, employee30_.callup_subject_id, employee30_.individual_id, employee30_.organization_id, employee30_.is_dismissed, employee30_.employment (...)
  • Index Cond: (employee30_.individual_id = partyuser27_.party_id)
  • Filter: ((NOT employee30_.is_dismissed) OR (employee30_.is_dismissed IS NULL))
17. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_position_employee_id_idx on public.pim_employee_position employeeto26_ (cost=0.29..0.41 rows=2 width=8) (never executed)

  • Output: employeeto26_.id, employeeto26_.dismissal_order_code, employeeto26_.start_date, employeeto26_.hiring_order_code, employeeto26_.rate, employeeto26_.end_date, employeeto26_.dismissal_reason_id, employeeto26_.employee (...)
  • Index Cond: (employeeto26_.employee_id = employee30_.id)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_position_pk on public.pim_position position28_ (cost=0.29..0.35 rows=1 width=8) (never executed)

  • Output: position28_.id, position28_.code, position28_.start_date, position28_.name, position28_.end_date, position28_.department_id, position28_.organization_id, position28_.role_id, position28_.speciality_id, position28_.rate, (...)
  • Index Cond: (position28_.id = employeeto26_.position_id)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_department_pk on public.pim_department department29_ (cost=0.29..0.35 rows=1 width=4) (never executed)

  • Output: department29_.id, department29_.is_available_diagnosis, department29_.code, department29_.from_dt, department29_.name, department29_.to_dt, department29_.accounting_center_id, department29_.type_id, department29_.funding_id, d (...)
  • Index Cond: (department29_.id = position28_.department_id)
  • Filter: (department29_.is_social_significant = 1)
20. 0.000 0.000 ↓ 0.0 0

Index Only Scan using sec_user_pk on public.sec_user partyuser27_1_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: partyuser27_1_.id
  • Index Cond: (partyuser27_1_.id = 12795)
  • Heap Fetches: 0
21. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=13.71..83.72 rows=1 width=0) (never executed)

  • Hash Cond: (roleelemen34_.method_id = securityme36_.id)
22. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.40..74.77 rows=168 width=4) (never executed)

  • Output: roleelemen34_.method_id
23. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ak_userrole on public.sec_user_role userrole35_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: userrole35_.user_id, userrole35_.role_id
  • Index Cond: (userrole35_.user_id = 12795)
  • Heap Fetches: 0
24. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.sec_role_element roleelemen34_ (cost=5.12..65.39 rows=108 width=8) (never executed)

  • Output: roleelemen34_.id, roleelemen34_.obj_group_id, roleelemen34_.property_id, roleelemen34_.role_id, roleelemen34_.method_id, roleelemen34_.aud_who, roleelemen34_.aud_when, roleelemen34_.aud_source, roleelemen34_.aud_who_create, ro (...)
  • Recheck Cond: (roleelemen34_.role_id = userrole35_.role_id)
25. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on sec_role_element_role_id_idx (cost=0.00..5.09 rows=108 width=0) (never executed)

  • Index Cond: (roleelemen34_.role_id = userrole35_.role_id)
26. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.29..8.29 rows=1 width=4) (never executed)

  • Output: securityme36_.id
27. 0.000 0.000 ↓ 0.0 0

Index Scan using sec_class_method_code_ak on public.sec_class_method securityme36_ (cost=0.27..8.29 rows=1 width=4) (never executed)

  • Output: securityme36_.id
  • Index Cond: ((securityme36_.code)::text = 'SocialSignificant.PsychiatricProfile'::text)
28. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.73..26.09 rows=1 width=0) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.44..17.77 rows=1 width=4) (never executed)

  • Output: partyuser38_.id
30. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.16..17.41 rows=1 width=8) (never executed)

  • Output: position39_.department_id, partyuser38_.id
31. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.86..17.05 rows=1 width=8) (never executed)

  • Output: employeeto37_.position_id, partyuser38_.id
32. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.62 rows=1 width=8) (never executed)

  • Output: partyuser38_.id, employee41_.id
33. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sec_user_party on public.sec_user_party partyuser38_ (cost=0.29..8.30 rows=1 width=8) (never executed)

  • Output: partyuser38_.id, partyuser38_.party_id, partyuser38_.aud_who, partyuser38_.aud_when, partyuser38_.aud_source, partyuser38_.aud_who_create, partyuser38_.aud_when_create, partyuser38_.aud_source_create
  • Index Cond: (partyuser38_.id = 12795)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_individual_id_idx on public.pim_employee employee41_ (cost=0.29..8.31 rows=1 width=8) (never executed)

  • Output: employee41_.id, employee41_.note, employee41_.number, employee41_.photo, employee41_.callup_subject_id, employee41_.individual_id, employee41_.organization_id, employee41_.is_dismissed, employee41_.employment (...)
  • Index Cond: (employee41_.individual_id = partyuser38_.party_id)
  • Filter: ((NOT employee41_.is_dismissed) OR (employee41_.is_dismissed IS NULL))
35. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_position_employee_id_idx on public.pim_employee_position employeeto37_ (cost=0.29..0.41 rows=2 width=8) (never executed)

  • Output: employeeto37_.id, employeeto37_.dismissal_order_code, employeeto37_.start_date, employeeto37_.hiring_order_code, employeeto37_.rate, employeeto37_.end_date, employeeto37_.dismissal_reason_id, employeeto37_.employee (...)
  • Index Cond: (employeeto37_.employee_id = employee41_.id)
36. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_position_pk on public.pim_position position39_ (cost=0.29..0.35 rows=1 width=8) (never executed)

  • Output: position39_.id, position39_.code, position39_.start_date, position39_.name, position39_.end_date, position39_.department_id, position39_.organization_id, position39_.role_id, position39_.speciality_id, position39_.rate, (...)
  • Index Cond: (position39_.id = employeeto37_.position_id)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_department_pk on public.pim_department department40_ (cost=0.29..0.35 rows=1 width=4) (never executed)

  • Output: department40_.id, department40_.is_available_diagnosis, department40_.code, department40_.from_dt, department40_.name, department40_.to_dt, department40_.accounting_center_id, department40_.type_id, department40_.funding_id, d (...)
  • Index Cond: (department40_.id = position39_.department_id)
  • Filter: (department40_.is_social_significant = 2)
38. 0.000 0.000 ↓ 0.0 0

Index Only Scan using sec_user_pk on public.sec_user partyuser38_1_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: partyuser38_1_.id
  • Index Cond: (partyuser38_1_.id = 12795)
  • Heap Fetches: 0
39. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=13.71..83.72 rows=1 width=0) (never executed)

  • Hash Cond: (roleelemen45_.method_id = securityme47_.id)
40. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.40..74.77 rows=168 width=4) (never executed)

  • Output: roleelemen45_.method_id
41. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ak_userrole on public.sec_user_role userrole46_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: userrole46_.user_id, userrole46_.role_id
  • Index Cond: (userrole46_.user_id = 12795)
  • Heap Fetches: 0
42. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.sec_role_element roleelemen45_ (cost=5.12..65.39 rows=108 width=8) (never executed)

  • Output: roleelemen45_.id, roleelemen45_.obj_group_id, roleelemen45_.property_id, roleelemen45_.role_id, roleelemen45_.method_id, roleelemen45_.aud_who, roleelemen45_.aud_when, roleelemen45_.aud_source, roleelemen45_.aud_who_create, ro (...)
  • Recheck Cond: (roleelemen45_.role_id = userrole46_.role_id)
43. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on sec_role_element_role_id_idx (cost=0.00..5.09 rows=108 width=0) (never executed)

  • Index Cond: (roleelemen45_.role_id = userrole46_.role_id)
44. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.29..8.29 rows=1 width=4) (never executed)

  • Output: securityme47_.id
45. 0.000 0.000 ↓ 0.0 0

Index Scan using sec_class_method_code_ak on public.sec_class_method securityme47_ (cost=0.27..8.29 rows=1 width=4) (never executed)

  • Output: securityme47_.id
46. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.73..26.09 rows=1 width=0) (never executed)

47. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.44..17.77 rows=1 width=4) (never executed)

  • Output: partyuser49_.id
48. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.16..17.41 rows=1 width=8) (never executed)

  • Output: position50_.department_id, partyuser49_.id
49. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.86..17.05 rows=1 width=8) (never executed)

  • Output: employeeto48_.position_id, partyuser49_.id
50. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.62 rows=1 width=8) (never executed)

  • Output: partyuser49_.id, employee52_.id
51. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sec_user_party on public.sec_user_party partyuser49_ (cost=0.29..8.30 rows=1 width=8) (never executed)

  • Output: partyuser49_.id, partyuser49_.party_id, partyuser49_.aud_who, partyuser49_.aud_when, partyuser49_.aud_source, partyuser49_.aud_who_create, partyuser49_.aud_when_create, partyuser49_.aud_source_create
  • Index Cond: (partyuser49_.id = 12795)
52. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_individual_id_idx on public.pim_employee employee52_ (cost=0.29..8.31 rows=1 width=8) (never executed)

  • Output: employee52_.id, employee52_.note, employee52_.number, employee52_.photo, employee52_.callup_subject_id, employee52_.individual_id, employee52_.organization_id, employee52_.is_dismissed, employee52_.employment (...)
  • Index Cond: (employee52_.individual_id = partyuser49_.party_id)
  • Filter: ((NOT employee52_.is_dismissed) OR (employee52_.is_dismissed IS NULL))
53. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_position_employee_id_idx on public.pim_employee_position employeeto48_ (cost=0.29..0.41 rows=2 width=8) (never executed)

  • Output: employeeto48_.id, employeeto48_.dismissal_order_code, employeeto48_.start_date, employeeto48_.hiring_order_code, employeeto48_.rate, employeeto48_.end_date, employeeto48_.dismissal_reason_id, employeeto48_.employee (...)
  • Index Cond: (employeeto48_.employee_id = employee52_.id)
54. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_position_pk on public.pim_position position50_ (cost=0.29..0.35 rows=1 width=8) (never executed)

  • Output: position50_.id, position50_.code, position50_.start_date, position50_.name, position50_.end_date, position50_.department_id, position50_.organization_id, position50_.role_id, position50_.speciality_id, position50_.rate, (...)
  • Index Cond: (position50_.id = employeeto48_.position_id)
55. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_department_pk on public.pim_department department51_ (cost=0.29..0.35 rows=1 width=4) (never executed)

  • Output: department51_.id, department51_.is_available_diagnosis, department51_.code, department51_.from_dt, department51_.name, department51_.to_dt, department51_.accounting_center_id, department51_.type_id, department51_.funding_id, d (...)
  • Index Cond: (department51_.id = position50_.department_id)
  • Filter: (department51_.is_social_significant = 3)
56. 0.000 0.000 ↓ 0.0 0

Index Only Scan using sec_user_pk on public.sec_user partyuser49_1_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: partyuser49_1_.id
  • Index Cond: (partyuser49_1_.id = 12795)
  • Heap Fetches: 0
57. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=13.71..83.72 rows=1 width=0) (never executed)

  • Hash Cond: (roleelemen56_.method_id = securityme58_.id)
58. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.40..74.77 rows=168 width=4) (never executed)

  • Output: roleelemen56_.method_id
59. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ak_userrole on public.sec_user_role userrole57_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: userrole57_.user_id, userrole57_.role_id
  • Index Cond: (userrole57_.user_id = 12795)
  • Heap Fetches: 0
60. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.sec_role_element roleelemen56_ (cost=5.12..65.39 rows=108 width=8) (never executed)

  • Output: roleelemen56_.id, roleelemen56_.obj_group_id, roleelemen56_.property_id, roleelemen56_.role_id, roleelemen56_.method_id, roleelemen56_.aud_who, roleelemen56_.aud_when, roleelemen56_.aud_source, roleelemen56_.aud_who_create, ro (...)
  • Recheck Cond: (roleelemen56_.role_id = userrole57_.role_id)
61. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on sec_role_element_role_id_idx (cost=0.00..5.09 rows=108 width=0) (never executed)

  • Index Cond: (roleelemen56_.role_id = userrole57_.role_id)
62. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.29..8.29 rows=1 width=4) (never executed)

  • Output: securityme58_.id
63. 0.000 0.000 ↓ 0.0 0

Index Scan using sec_class_method_code_ak on public.sec_class_method securityme58_ (cost=0.27..8.29 rows=1 width=4) (never executed)

  • Output: securityme58_.id
  • Index Cond: ((securityme58_.code)::text = 'SocialSignificant.TBProfile'::text)
64. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.73..26.09 rows=1 width=0) (never executed)

65. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.44..17.77 rows=1 width=4) (never executed)

  • Output: partyuser60_.id
66. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.16..17.41 rows=1 width=8) (never executed)

  • Output: position61_.department_id, partyuser60_.id
67. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.86..17.05 rows=1 width=8) (never executed)

  • Output: employeeto59_.position_id, partyuser60_.id
68. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.62 rows=1 width=8) (never executed)

  • Output: partyuser60_.id, employee63_.id
69. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sec_user_party on public.sec_user_party partyuser60_ (cost=0.29..8.30 rows=1 width=8) (never executed)

  • Output: partyuser60_.id, partyuser60_.party_id, partyuser60_.aud_who, partyuser60_.aud_when, partyuser60_.aud_source, partyuser60_.aud_who_create, partyuser60_.aud_when_create, partyuser60_.aud_source_create
  • Index Cond: (partyuser60_.id = 12795)
70. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_individual_id_idx on public.pim_employee employee63_ (cost=0.29..8.31 rows=1 width=8) (never executed)

  • Output: employee63_.id, employee63_.note, employee63_.number, employee63_.photo, employee63_.callup_subject_id, employee63_.individual_id, employee63_.organization_id, employee63_.is_dismissed, employee63_.employment (...)
  • Index Cond: (employee63_.individual_id = partyuser60_.party_id)
  • Filter: ((NOT employee63_.is_dismissed) OR (employee63_.is_dismissed IS NULL))
71. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_position_employee_id_idx on public.pim_employee_position employeeto59_ (cost=0.29..0.41 rows=2 width=8) (never executed)

  • Output: employeeto59_.id, employeeto59_.dismissal_order_code, employeeto59_.start_date, employeeto59_.hiring_order_code, employeeto59_.rate, employeeto59_.end_date, employeeto59_.dismissal_reason_id, employeeto59_.employee (...)
  • Index Cond: (employeeto59_.employee_id = employee63_.id)
72. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_position_pk on public.pim_position position61_ (cost=0.29..0.35 rows=1 width=8) (never executed)

  • Output: position61_.id, position61_.code, position61_.start_date, position61_.name, position61_.end_date, position61_.department_id, position61_.organization_id, position61_.role_id, position61_.speciality_id, position61_.rate, (...)
  • Index Cond: (position61_.id = employeeto59_.position_id)
73. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_department_pk on public.pim_department department62_ (cost=0.29..0.35 rows=1 width=4) (never executed)

  • Output: department62_.id, department62_.is_available_diagnosis, department62_.code, department62_.from_dt, department62_.name, department62_.to_dt, department62_.accounting_center_id, department62_.type_id, department62_.funding_id, d (...)
  • Index Cond: (department62_.id = position61_.department_id)
  • Filter: (department62_.is_social_significant = 4)
74. 0.000 0.000 ↓ 0.0 0

Index Only Scan using sec_user_pk on public.sec_user partyuser60_1_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: partyuser60_1_.id
  • Index Cond: (partyuser60_1_.id = 12795)
  • Heap Fetches: 0
75. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=13.71..83.72 rows=1 width=0) (never executed)

  • Hash Cond: (roleelemen67_.method_id = securityme69_.id)
76. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.40..74.77 rows=168 width=4) (never executed)

  • Output: roleelemen67_.method_id
77. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ak_userrole on public.sec_user_role userrole68_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: userrole68_.user_id, userrole68_.role_id
  • Index Cond: (userrole68_.user_id = 12795)
  • Heap Fetches: 0
78. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.sec_role_element roleelemen67_ (cost=5.12..65.39 rows=108 width=8) (never executed)

  • Output: roleelemen67_.id, roleelemen67_.obj_group_id, roleelemen67_.property_id, roleelemen67_.role_id, roleelemen67_.method_id, roleelemen67_.aud_who, roleelemen67_.aud_when, roleelemen67_.aud_source, roleelemen67_.aud_who_create, ro (...)
  • Recheck Cond: (roleelemen67_.role_id = userrole68_.role_id)
79. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on sec_role_element_role_id_idx (cost=0.00..5.09 rows=108 width=0) (never executed)

  • Index Cond: (roleelemen67_.role_id = userrole68_.role_id)
80. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.29..8.29 rows=1 width=4) (never executed)

  • Output: securityme69_.id
81. 0.000 0.000 ↓ 0.0 0

Index Scan using sec_class_method_code_ak on public.sec_class_method securityme69_ (cost=0.27..8.29 rows=1 width=4) (never executed)

  • Output: securityme69_.id
  • Index Cond: ((securityme69_.code)::text = 'SocialSignificant.HIVProfile'::text)
82. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.73..26.09 rows=1 width=0) (never executed)

83. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.44..17.77 rows=1 width=4) (never executed)

  • Output: partyuser71_.id
84. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.16..17.41 rows=1 width=8) (never executed)

  • Output: position72_.department_id, partyuser71_.id
85. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.86..17.05 rows=1 width=8) (never executed)

  • Output: employeeto70_.position_id, partyuser71_.id
86. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.62 rows=1 width=8) (never executed)

  • Output: partyuser71_.id, employee74_.id
87. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sec_user_party on public.sec_user_party partyuser71_ (cost=0.29..8.30 rows=1 width=8) (never executed)

  • Output: partyuser71_.id, partyuser71_.party_id, partyuser71_.aud_who, partyuser71_.aud_when, partyuser71_.aud_source, partyuser71_.aud_who_create, partyuser71_.aud_when_create, partyuser71_.aud_source_create
  • Index Cond: (partyuser71_.id = 12795)
88. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_individual_id_idx on public.pim_employee employee74_ (cost=0.29..8.31 rows=1 width=8) (never executed)

  • Output: employee74_.id, employee74_.note, employee74_.number, employee74_.photo, employee74_.callup_subject_id, employee74_.individual_id, employee74_.organization_id, employee74_.is_dismissed, employee74_.employment (...)
  • Index Cond: (employee74_.individual_id = partyuser71_.party_id)
  • Filter: ((NOT employee74_.is_dismissed) OR (employee74_.is_dismissed IS NULL))
89. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_employee_position_employee_id_idx on public.pim_employee_position employeeto70_ (cost=0.29..0.41 rows=2 width=8) (never executed)

  • Output: employeeto70_.id, employeeto70_.dismissal_order_code, employeeto70_.start_date, employeeto70_.hiring_order_code, employeeto70_.rate, employeeto70_.end_date, employeeto70_.dismissal_reason_id, employeeto70_.employee (...)
  • Index Cond: (employeeto70_.employee_id = employee74_.id)
90. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_position_pk on public.pim_position position72_ (cost=0.29..0.35 rows=1 width=8) (never executed)

  • Output: position72_.id, position72_.code, position72_.start_date, position72_.name, position72_.end_date, position72_.department_id, position72_.organization_id, position72_.role_id, position72_.speciality_id, position72_.rate, (...)
  • Index Cond: (position72_.id = employeeto70_.position_id)
91. 0.000 0.000 ↓ 0.0 0

Index Scan using pim_department_pk on public.pim_department department73_ (cost=0.29..0.35 rows=1 width=4) (never executed)

  • Output: department73_.id, department73_.is_available_diagnosis, department73_.code, department73_.from_dt, department73_.name, department73_.to_dt, department73_.accounting_center_id, department73_.type_id, department73_.funding_id, d (...)
  • Index Cond: (department73_.id = position72_.department_id)
  • Filter: (department73_.is_social_significant = 5)
92. 0.000 0.000 ↓ 0.0 0

Index Only Scan using sec_user_pk on public.sec_user partyuser71_1_ (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Output: partyuser71_1_.id
  • Index Cond: (partyuser71_1_.id = 12795)
  • Heap Fetches: 0
93. 4.380 5,067.056 ↑ 3.7 25 1

Sort (cost=185,897.61..185,897.84 rows=93 width=570) (actual time=5,067.053..5,067.056 rows=25 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, caseinitgo9_.name, caseinitgo9_.id, medicalcas18_.uid, medicalcas18_.open_date, diagnosis12_.name, diagnosis12_.code, casediagno10_.note, individual4_.surname, individual4_.name, individual4_.patr_name, (...)
  • Sort Key: (get_individual_surname_index(visit0_1_._patient_id)), (get_individual_name_index(visit0_1_._patient_id)), (get_individual_patr_name_index(visit0_1_._patient_id)), visit0_.id DESC
  • Sort Method: top-N heapsort Memory: 37kB
  • Buffers: shared hit=5313878
94. 383.794 5,062.676 ↓ 4.5 421 1

Nested Loop (cost=17.53..185,894.99 rows=93 width=570) (actual time=14.560..5,062.676 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, caseinitgo9_.name, caseinitgo9_.id, medicalcas18_.uid, medicalcas18_.open_date, diagnosis12_.name, diagnosis12_.code, casediagno10_.note, individual4_.surname, individual4_.name, individual4_.patr (...)
  • Buffers: shared hit=5313878
95. 0.654 44.093 ↓ 4.3 421 1

Nested Loop Left Join (cost=16.96..6,823.70 rows=97 width=559) (actual time=0.367..44.093 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.case_id, employee3_.id, individual4_.surname, individual4_.name, individual4_.patr_name, organizati6_.short_name, careregime7_.code, me (...)
  • Buffers: shared hit=17659
96. 0.901 40.492 ↓ 4.3 421 1

Nested Loop Left Join (cost=16.53..6,349.01 rows=97 width=511) (actual time=0.357..40.492 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.case_id, employee3_.id, individual4_.surname, individual4_.name, individual4_.patr_name, organizati6_.short_name, careregime7_.co (...)
  • Buffers: shared hit=15975
97. 0.598 36.223 ↓ 4.3 421 1

Nested Loop Left Join (cost=16.10..5,916.39 rows=97 width=507) (actual time=0.342..36.223 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.case_id, employee3_.id, individual4_.surname, individual4_.name, individual4_.patr_name, organizati6_.short_name, careregim (...)
  • Join Filter: (medicalcas13_.state_id = casestate14_.id)
  • Rows Removed by Join Filter: 2947
  • Buffers: shared hit=14333
98. 0.783 35.204 ↓ 4.3 421 1

Nested Loop Left Join (cost=16.10..5,905.12 rows=97 width=471) (actual time=0.332..35.204 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.case_id, employee3_.id, individual4_.surname, individual4_.name, individual4_.patr_name, organizati6_.short_name, car (...)
  • Buffers: shared hit=14332
99. 0.459 31.474 ↓ 4.3 421 1

Nested Loop Left Join (cost=15.53..5,071.65 rows=97 width=467) (actual time=0.322..31.474 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.case_id, employee3_.id, individual4_.surname, individual4_.name, individual4_.patr_name, organizati6_.short_nam (...)
  • Buffers: shared hit=12226
100. 1.192 28.910 ↓ 4.3 421 1

Nested Loop Left Join (cost=15.25..4,621.21 rows=97 width=383) (actual time=0.314..28.910 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.case_id, employee3_.id, individual4_.surname, individual4_.name, individual4_.patr_name, organizati6_.sho (...)
  • Join Filter: (casediagno10_.disease_type_id = diseasetyp11_.id)
  • Rows Removed by Join Filter: 4210
  • Buffers: shared hit=10963
101. 0.571 27.297 ↓ 4.3 421 1

Nested Loop Left Join (cost=15.25..4,604.07 rows=97 width=338) (actual time=0.305..27.297 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.case_id, employee3_.id, individual4_.surname, individual4_.name, individual4_.patr_name, organizati (...)
  • Buffers: shared hit=10962
102. 1.586 23.358 ↓ 4.3 421 1

Nested Loop Left Join (cost=14.68..3,770.36 rows=97 width=326) (actual time=0.294..23.358 rows=421 loops=1)

  • Output: visit0_.id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.main_diagnosis_id, visit0_1_.case_id, employee3_.id, individual4_.surname, individual4_.name, (...)
  • Join Filter: (visit0_.goal_id = caseinitgo9_.id)
  • Rows Removed by Join Filter: 11665
  • Buffers: shared hit=8855
103. 0.897 20.930 ↓ 4.3 421 1

Hash Left Join (cost=14.68..3,728.27 rows=97 width=184) (actual time=0.254..20.930 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.main_diagnosis_id, visit0_1_.case_id, employee3_.id, individual4_.surn (...)
  • Hash Cond: (visit0_1_.profile_id = medicalpro8_.id)
  • Buffers: shared hit=8854
104. 0.574 19.914 ↓ 4.3 421 1

Nested Loop Left Join (cost=3.28..3,715.53 rows=97 width=102) (actual time=0.119..19.914 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.profile_id, visit0_1_.main_diagnosis_id, visit0_1_.case_id, empl (...)
  • Join Filter: (visit0_1_.regimen_id = careregime7_.id)
  • Rows Removed by Join Filter: 3245
  • Buffers: shared hit=8848
105. 0.633 18.919 ↓ 4.3 421 1

Nested Loop Left Join (cost=3.28..3,702.79 rows=97 width=102) (actual time=0.106..18.919 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.regimen_id, visit0_1_.profile_id, visit0_1_.main_diagnosis (...)
  • Join Filter: (clinic5_.id = organizati6_.id)
  • Buffers: shared hit=8847
106. 0.305 18.286 ↓ 4.3 421 1

Nested Loop Left Join (cost=2.98..3,693.03 rows=97 width=92) (actual time=0.092..18.286 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.regimen_id, visit0_1_.profile_id, visit0_1_.main_dia (...)
  • Join Filter: (visit0_1_._clinic_id = clinic5_.id)
  • Buffers: shared hit=8844
107. 0.687 17.560 ↓ 4.3 421 1

Nested Loop Left Join (cost=2.71..3,683.28 rows=97 width=88) (actual time=0.077..17.560 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.regimen_id, visit0_1_.profile_id, visit0_1_.ma (...)
  • Buffers: shared hit=8841
108. 0.560 14.768 ↓ 4.3 421 1

Nested Loop Left Join (cost=2.28..3,036.45 rows=97 width=44) (actual time=0.067..14.768 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.regimen_id, visit0_1_.profile_id, visit0 (...)
  • Buffers: shared hit=7157
109. 2.606 12.103 ↓ 4.3 421 1

Nested Loop Left Join (cost=1.99..2,581.54 rows=97 width=40) (actual time=0.058..12.103 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.regimen_id, visit0_1_.profile_id, (...)
  • Buffers: shared hit=5894
  • -> Index Scan using pim_employee_position_pk on public.pim_employee_position employeeto2_ (cost=0.29..4.70 rows=1 width=8) (actual time=0.004..0.005 r (...)
110. 3.708 9.497 ↓ 4.3 421 1

Nested Loop Left Join (cost=1.70..2,125.13 rows=97 width=40) (actual time=0.049..9.497 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.regimen_id, visit0_1_.profil (...)
  • Buffers: shared hit=4631
  • -> Index Scan using sr_res_group_pk on public.sr_res_group resourcegr1_ (cost=0.57..8.59 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops= (...)
  • Output: employeeto2_.id, employeeto2_.dismissal_order_code, employeeto2_.start_date, employeeto2_.hiring_order_code, employeeto2_.rate, employeeto (...)
  • Index Cond: (resourcegr1_.responsible_id = employeeto2_.id)
  • Buffers: shared hit=1263
111. 2.842 5.789 ↓ 4.3 421 1

Nested Loop (cost=1.13..1,291.17 rows=97 width=40) (actual time=0.037..5.789 rows=421 loops=1)

  • Output: visit0_.id, visit0_.goal_id, visit0_1_.admission_date, visit0_1_._clinic_id, visit0_1_._patient_id, visit0_1_.res_group_id, visit0_1 (...)
  • Buffers: shared hit=2525
  • -> Index Scan using mc_step__clinic_id_admission_date_outcome_date_ix on public.mc_step visit0_1_ (cost=0.56..414.73 rows=102 width=36) (a (...)
  • Output: visit0_1_.id, visit0_1_.admission_date, visit0_1_.admission_time, visit0_1_.death_date, visit0_1_.death_time, visit0_1_.outcom (...)
  • Index Cond: ((visit0_1_._clinic_id = 134) AND (visit0_1_.admission_date >= '2019-05-11'::date) AND (visit0_1_.admission_date <= '2019- (...)
  • Buffers: shared hit=418
  • Output: resourcegr1_.id, resourcegr1_.bdate, resourcegr1_.edate, resourcegr1_.is_system, resourcegr1_.name, resourcegr1_.department_id, reso (...)
  • Index Cond: (visit0_1_.res_group_id = resourcegr1_.id)
  • Buffers: shared hit=2106
112. 2.947 2.947 ↑ 1.0 1 421

Index Scan using plc_visit_pk on public.plc_visit visit0_ (cost=0.56..8.58 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=421)

  • Output: visit0_.id, visit0_.duration, visit0_.goal_id, visit0_.initiator_id, visit0_.place_id, visit0_.type_id, visit0_.is_viewed, vis (...)
  • Index Cond: (visit0_.id = visit0_1_.id)
  • Buffers: shared hit=2107
113. 2.105 2.105 ↑ 1.0 1 421

Index Scan using pim_employee_pk on public.pim_employee employee3_ (cost=0.29..4.68 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=421)

  • Output: employee3_.id, employee3_.note, employee3_.number, employee3_.photo, employee3_.callup_subject_id, employee3_.individual_id, employee3_.organiza (...)
  • Index Cond: (employeeto2_.employee_id = employee3_.id)
  • Buffers: shared hit=1263
114. 2.105 2.105 ↑ 1.0 1 421

Index Scan using pim_individual_pk on public.pim_individual individual4_ (cost=0.43..6.66 rows=1 width=52) (actual time=0.005..0.005 rows=1 loops=421)

  • Output: individual4_.id, individual4_.birth_dt, individual4_.death_dt, individual4_.has_citizenship, individual4_.name, individual4_.patr_name, individual4_.s (...)
  • Index Cond: (employee3_.individual_id = individual4_.id)
  • Buffers: shared hit=1684
115. 0.414 0.421 ↑ 1.0 1 421

Materialize (cost=0.27..8.30 rows=1 width=4) (actual time=0.000..0.001 rows=1 loops=421)

  • Output: clinic5_.id
  • Buffers: shared hit=3
116. 0.007 0.007 ↑ 1.0 1 1

Index Only Scan using md_clinic_pk on public.md_clinic clinic5_ (cost=0.27..8.29 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=1)

  • Output: clinic5_.id
  • Index Cond: (clinic5_.id = 134)
  • Heap Fetches: 1
  • Buffers: shared hit=3
117. 0.000 0.000 ↑ 1.0 1 421

Materialize (cost=0.29..8.32 rows=1 width=18) (actual time=0.000..0.000 rows=1 loops=421)

  • Output: organizati6_.short_name, organizati6_.id
  • Buffers: shared hit=3
118. 0.008 0.008 ↑ 1.0 1 1

Index Scan using pim_organization_pk on public.pim_organization organizati6_ (cost=0.29..8.31 rows=1 width=18) (actual time=0.007..0.008 rows=1 loops=1)

  • Output: organizati6_.short_name, organizati6_.id
  • Index Cond: (organizati6_.id = 134)
  • Buffers: shared hit=3
119. 0.415 0.421 ↑ 1.0 8 421

Materialize (cost=0.00..1.12 rows=8 width=8) (actual time=0.000..0.001 rows=8 loops=421)

  • Output: careregime7_.code, careregime7_.id
  • Buffers: shared hit=1
120. 0.006 0.006 ↑ 1.0 8 1

Seq Scan on public.mc_care_regimen careregime7_ (cost=0.00..1.08 rows=8 width=8) (actual time=0.004..0.006 rows=8 loops=1)

  • Output: careregime7_.code, careregime7_.id
  • Buffers: shared hit=1
121. 0.066 0.119 ↑ 1.0 240 1

Hash (cost=8.40..8.40 rows=240 width=90) (actual time=0.119..0.119 rows=240 loops=1)

  • Output: medicalpro8_.name, medicalpro8_.id
  • Buckets: 1024 Batches: 1 Memory Usage: 37kB
  • Buffers: shared hit=6
122. 0.053 0.053 ↑ 1.0 240 1

Seq Scan on public.md_profile medicalpro8_ (cost=0.00..8.40 rows=240 width=90) (actual time=0.005..0.053 rows=240 loops=1)

  • Output: medicalpro8_.name, medicalpro8_.id
  • Buffers: shared hit=6
123. 0.832 0.842 ↑ 1.0 28 421

Materialize (cost=0.00..1.42 rows=28 width=146) (actual time=0.000..0.002 rows=28 loops=421)

  • Output: caseinitgo9_.name, caseinitgo9_.id
  • Buffers: shared hit=1
124. 0.010 0.010 ↑ 1.0 28 1

Seq Scan on public.mc_case_init_goal caseinitgo9_ (cost=0.00..1.28 rows=28 width=146) (actual time=0.004..0.010 rows=28 loops=1)

  • Output: caseinitgo9_.name, caseinitgo9_.id
  • Buffers: shared hit=1
125. 3.368 3.368 ↑ 1.0 1 421

Index Scan using mc_diagnosis_pk on public.mc_diagnosis casediagno10_ (cost=0.57..8.59 rows=1 width=20) (actual time=0.007..0.008 rows=1 loops=421)

  • Output: casediagno10_.id, casediagno10_.establishment_date, casediagno10_.note, casediagno10_.diagnos_id, casediagno10_.disease_type_id, casediagno10_.doctor_id, casediagno10_.injury_type_id, ca (...)
  • Index Cond: (visit0_1_.main_diagnosis_id = casediagno10_.id)
  • Buffers: shared hit=2107
126. 0.417 0.421 ↑ 1.0 11 421

Materialize (cost=0.00..1.17 rows=11 width=53) (actual time=0.000..0.001 rows=11 loops=421)

  • Output: diseasetyp11_.name, diseasetyp11_.id
  • Buffers: shared hit=1
127. 0.004 0.004 ↑ 1.0 11 1

Seq Scan on public.mc_disease_type diseasetyp11_ (cost=0.00..1.11 rows=11 width=53) (actual time=0.002..0.004 rows=11 loops=1)

  • Output: diseasetyp11_.name, diseasetyp11_.id
  • Buffers: shared hit=1
128. 2.105 2.105 ↑ 1.0 1 421

Index Scan using md_diagnosis_pk on public.md_diagnosis diagnosis12_ (cost=0.29..4.63 rows=1 width=92) (actual time=0.004..0.005 rows=1 loops=421)

  • Output: diagnosis12_.id, diagnosis12_.code, diagnosis12_.name, diagnosis12_.parent_id, diagnosis12_.is_injury, diagnosis12_.level, diagnosis12_.is_leaf, diagnosis12_.e_code, diagnosis12_.oms, diagnosis12_.s (...)
  • Index Cond: (casediagno10_.diagnos_id = diagnosis12_.id)
  • Buffers: shared hit=1263
129. 2.947 2.947 ↑ 1.0 1 421

Index Scan using mc_case_pk on public.mc_case medicalcas13_ (cost=0.56..8.58 rows=1 width=12) (actual time=0.007..0.007 rows=1 loops=421)

  • Output: medicalcas13_.id, medicalcas13_.create_date, medicalcas13_.emergency_team_code, medicalcas13_.note, medicalcas13_.plan_case_duration, medicalcas13_.plan_hosp_date, medicalcas13_.uid, medicalcas13_.who_del (...)
  • Index Cond: (visit0_1_.case_id = medicalcas13_.id)
  • Buffers: shared hit=2106
130. 0.418 0.421 ↑ 1.0 7 421

Materialize (cost=0.00..1.10 rows=7 width=44) (actual time=0.000..0.001 rows=7 loops=421)

  • Output: casestate14_.name, casestate14_.id
  • Buffers: shared hit=1
131. 0.003 0.003 ↑ 1.0 7 1

Seq Scan on public.mc_case_state casestate14_ (cost=0.00..1.07 rows=7 width=44) (actual time=0.002..0.003 rows=7 loops=1)

  • Output: casestate14_.name, casestate14_.id
  • Buffers: shared hit=1
132. 3.368 3.368 ↑ 1.0 1 421

Index Only Scan using pci_patient_pkey on public.pci_patient patient15_ (cost=0.43..4.45 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=421)

  • Output: patient15_.id
  • Index Cond: (patient15_.id = visit0_1_._patient_id)
  • Heap Fetches: 374
  • Buffers: shared hit=1642
133. 2.947 2.947 ↑ 1.0 1 421

Index Scan using pim_individual_pk on public.pim_individual individual16_ (cost=0.43..4.88 rows=1 width=52) (actual time=0.007..0.007 rows=1 loops=421)

  • Output: individual16_.id, individual16_.birth_dt, individual16_.death_dt, individual16_.has_citizenship, individual16_.name, individual16_.patr_name, individual16_.surname, individual16_.gender_id, individual16_.nationality_id, in (...)
  • Index Cond: (patient15_.id = individual16_.id)
  • Buffers: shared hit=1684
134. 2.105 2.105 ↑ 1.0 1 421

Index Scan using mc_case_pk on public.mc_case medicalcas18_ (cost=0.56..8.60 rows=1 width=19) (actual time=0.004..0.005 rows=1 loops=421)

  • Output: medicalcas18_.id, medicalcas18_.create_date, medicalcas18_.emergency_team_code, medicalcas18_.note, medicalcas18_.plan_case_duration, medicalcas18_.plan_hosp_date, medicalcas18_.uid, medicalcas18_.who_delivered, medicalcas18_.wh (...)
  • Index Cond: (medicalcas18_.id = visit0_1_.case_id)
  • Filter: ((medicalcas18_.clinic_id <> '-1'::integer) AND ((medicalcas18_.is_social_significant IS NULL) OR ((medicalcas18_.is_social_significant = 1) AND ($5 OR $10)) OR ((medicalcas18_.is_social_significant = 2) AND ($12 OR $17)) OR ((m (...)
  • Buffers: shared hit=2106
135.          

SubPlan (forNested Loop)

136. 0.421 4,632.684 ↓ 0.0 0 421

Limit (cost=1,915.26..1,915.27 rows=1 width=8) (actual time=11.004..11.004 rows=0 loops=421)

  • Output: ssr.bdate, msr.id
  • Buffers: shared hit=5228852
137. 1.684 4,632.263 ↓ 0.0 0 421

Sort (cost=1,915.26..1,915.27 rows=1 width=8) (actual time=11.003..11.003 rows=0 loops=421)

  • Output: ssr.bdate, msr.id
  • Sort Key: msr.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=5228852
138. 0.421 4,630.579 ↓ 0.0 0 421

Nested Loop (cost=85.74..1,915.25 rows=1 width=8) (actual time=10.999..10.999 rows=0 loops=421)

  • Output: ssr.bdate, msr.id
  • Join Filter: (mes.service_id = ssr.service_id)
  • Buffers: shared hit=5228852
139. 0.421 4,630.158 ↓ 0.0 0 421

Nested Loop (cost=85.17..1,459.59 rows=53 width=8) (actual time=10.998..10.998 rows=0 loops=421)

  • Output: msr.id, mes.service_id
  • Buffers: shared hit=5228852
140. 0.842 4,629.737 ↓ 0.0 0 421

Nested Loop (cost=84.89..1,443.13 rows=53 width=8) (actual time=10.997..10.997 rows=0 loops=421)

  • Output: msr.id, mesp.service_id
  • Buffers: shared hit=5228852
141. 1,288.681 4,628.895 ↓ 0.0 0 421

Merge Join (cost=84.60..1,396.47 rows=84 width=8) (actual time=10.995..10.995 rows=0 loops=421)

  • Output: msr.id, mep.id
  • Merge Cond: (mep.case_id = msr.case_id)
  • Buffers: shared hit=5228852
142. 3,336.425 3,336.425 ↑ 5.5 24,899 421

Index Scan using md_event_patient__case_id_ix on disp.md_event_patient mep (cost=0.42..6,872.97 rows=137,046 width=8) (actual time=0.007..7.925 rows=24,899 loops=421)

  • Output: mep.id, mep.event_id, mep.indiv_id, mep.event_age, mep.not_actual_patient, mep.number_report, mep._overview, mep.is_deleted, mep.case_id, mep.aud_who, mep.aud_when, mep.aud_source, mep.aud_w (...)
  • Buffers: shared hit=5226743
143. 1.684 3.789 ↑ 575.0 1 421

Sort (cost=83.09..84.53 rows=575 width=8) (actual time=0.008..0.009 rows=1 loops=421)

  • Output: msr.id, msr.case_id
  • Sort Key: msr.case_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2109
144. 2.105 2.105 ↑ 575.0 1 421

Index Scan using md_srv_rendered_step_id_idx on public.md_srv_rendered msr (cost=0.57..56.74 rows=575 width=8) (actual time=0.005..0.005 rows=1 loops=421)

  • Output: msr.id, msr.case_id
  • Index Cond: (msr.step_id = visit0_.id)
  • Buffers: shared hit=2109
145. 0.000 0.000 ↓ 0.0 0

Index Scan using md_event_service_patient__event_patient_id_ix on disp.md_event_service_patient mesp (cost=0.29..0.48 rows=8 width=8) (never executed)

  • Output: mesp.id, mesp.service_id, mesp.indiv_id, mesp.event_id, mesp.event_patient_id, mesp.barcode, mesp.biomaterial_dt, mesp.specialist_snils, mesp.status, mesp.aud_who, mesp.aud_when, mesp.aud_source, (...)
  • Index Cond: (mesp.event_patient_id = mep.id)
146. 0.000 0.000 ↓ 0.0 0

Index Scan using md_event_service_pkey on disp.md_event_service mes (cost=0.28..0.30 rows=1 width=8) (never executed)

  • Output: mes.id, mes.event_id, mes.org_id, mes.resource_id, mes.service_id, mes.first, mes.last, mes.district_check, mes.standard_prescription_id, mes.order_idx, mes.ignore_service, mes.is_mobile_medical_teams, (...)
  • Index Cond: (mes.id = mesp.service_id)
147. 0.000 0.000 ↓ 0.0 0

Index Scan using sr_srv_rendered_pk on public.sr_srv_rendered ssr (cost=0.57..8.59 rows=1 width=12) (never executed)

  • Output: ssr.id, ssr.bdate, ssr.comment, ssr.cost, ssr.duration, ssr.edate, ssr.is_rendered, ssr.quantity, ssr.total_cost, ssr.contract_id, ssr.customer_id, ssr.funding_id, ssr.res_group_id, ssr.service_id, ssr.durati (...)
  • Index Cond: (ssr.id = msr.id)