explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pPHn

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 509.706 ↑ 1.0 25 1

Limit (cost=11,770,356.22..11,770,356.28 rows=25 width=570) (actual time=509.703..509.706 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=190127
2.          

Initplan (forLimit)

3. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=13.71..77.79 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..68.85 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..59.47 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..77.79 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..68.85 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..59.47 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..77.79 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..68.85 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..59.47 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
  • Index Cond: ((securityme47_.code)::text = 'SocialSignificant.VenereologicalProfile'::text)
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..77.79 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..68.85 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..59.47 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..77.79 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..68.85 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..59.47 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. 0.493 509.704 ↑ 52.2 25 1

Sort (cost=11,769,836.82..11,769,840.08 rows=1,304 width=570) (actual time=509.702..509.704 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: 50kB
  • Buffers: shared hit=190127
94. 450.434 509.211 ↑ 13.3 98 1

Nested Loop (cost=4,448.35..11,769,800.02 rows=1,304 width=570) (actual time=56.526..509.211 rows=98 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=190127
95. 0.097 55.935 ↑ 13.9 98 1

Nested Loop Left Join (cost=4,447.79..85,147.39 rows=1,360 width=559) (actual time=49.350..55.935 rows=98 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=4654
96. 0.087 55.054 ↑ 13.9 98 1

Nested Loop Left Join (cost=4,447.36..78,510.41 rows=1,360 width=511) (actual time=49.333..55.054 rows=98 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=4262
97. 0.147 54.085 ↑ 13.9 98 1

Nested Loop Left Join (cost=4,446.92..67,326.59 rows=1,360 width=507) (actual time=49.313..54.085 rows=98 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: 617
  • Buffers: shared hit=3869
98. 0.141 53.840 ↑ 13.9 98 1

Nested Loop Left Join (cost=4,446.92..67,182.70 rows=1,360 width=471) (actual time=49.296..53.840 rows=98 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=3868
99. 0.232 53.111 ↑ 13.9 98 1

Hash Left Join (cost=4,446.36..55,530.97 rows=1,360 width=467) (actual time=49.276..53.111 rows=98 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 (...)
  • Hash Cond: (casediagno10_.diagnos_id = diagnosis12_.id)
  • Buffers: shared hit=3377
100. 0.172 44.961 ↑ 13.9 98 1

Nested Loop Left Join (cost=3,776.68..54,842.60 rows=1,360 width=383) (actual time=41.286..44.961 rows=98 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: 1077
  • Buffers: shared hit=3043
101. 0.104 44.691 ↑ 13.9 98 1

Nested Loop Left Join (cost=3,776.68..54,617.06 rows=1,360 width=338) (actual time=41.254..44.691 rows=98 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=3042
102. 0.091 44.195 ↑ 13.9 98 1

Hash Left Join (cost=3,776.11..42,943.00 rows=1,360 width=326) (actual time=41.236..44.195 rows=98 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, (...)
  • Hash Cond: (visit0_.goal_id = caseinitgo9_.id)
  • Buffers: shared hit=2691
103. 0.098 44.080 ↑ 13.9 98 1

Hash Left Join (cost=3,774.48..42,922.67 rows=1,360 width=184) (actual time=41.197..44.080 rows=98 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=2690
104. 0.125 43.788 ↑ 13.9 98 1

Nested Loop Left Join (cost=3,763.08..42,892.60 rows=1,360 width=102) (actual time=40.983..43.788 rows=98 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: 686
  • Buffers: shared hit=2684
105. 0.102 43.565 ↑ 13.9 98 1

Nested Loop Left Join (cost=3,763.08..42,728.30 rows=1,360 width=102) (actual time=40.971..43.565 rows=98 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=2683
106. 0.131 43.463 ↑ 13.9 98 1

Nested Loop Left Join (cost=3,762.79..42,699.59 rows=1,360 width=92) (actual time=40.954..43.463 rows=98 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=2680
107. 0.072 43.332 ↑ 13.9 98 1

Nested Loop Left Join (cost=3,762.52..42,670.90 rows=1,360 width=88) (actual time=40.934..43.332 rows=98 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=2677
108. 0.631 42.770 ↑ 13.9 98 1

Hash Left Join (cost=3,762.09..33,606.49 rows=1,360 width=44) (actual time=40.898..42.770 rows=98 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 (...)
  • Hash Cond: (employeeto2_.employee_id = employee3_.id)
  • Buffers: shared hit=2285
109. 0.215 25.271 ↑ 13.9 98 1

Hash Left Join (cost=2,196.32..32,022.02 rows=1,360 width=40) (actual time=23.497..25.271 rows=98 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, (...)
  • Hash Cond: (resourcegr1_.responsible_id = employeeto2_.id)
  • Buffers: shared hit=1806
110. 0.728 1.694 ↑ 13.9 98 1

Nested Loop Left Join (cost=1.70..29,808.80 rows=1,360 width=40) (actual time=0.040..1.694 rows=98 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=1031
  • -> Index Scan using sr_res_group_pk on public.sr_res_group resourcegr1_ (cost=0.57..8.58 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops= (...)
111. 0.378 0.966 ↑ 13.9 98 1

Nested Loop (cost=1.13..18,123.77 rows=1,360 width=40) (actual time=0.031..0.966 rows=98 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=540
  • -> Index Scan using mc_step__clinic_id_admission_date_outcome_date_ix on public.mc_step visit0_1_ (cost=0.56..5804.35 rows=1437 width=36) (...)
  • 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 >= '2018-05-12'::date) AND (visit0_1_.admission_date <= '2018- (...)
  • Buffers: shared hit=50
  • 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=491
112. 0.588 0.588 ↑ 1.0 1 98

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

  • 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=490
113. 11.386 23.362 ↑ 1.0 63,094 1

Hash (cost=1,405.94..1,405.94 rows=63,094 width=8) (actual time=23.362..23.362 rows=63,094 loops=1)

  • Output: employeeto2_.id, employeeto2_.employee_id
  • Buckets: 65536 Batches: 1 Memory Usage: 2977kB
  • Buffers: shared hit=775
114. 11.976 11.976 ↑ 1.0 63,094 1

Seq Scan on public.pim_employee_position employeeto2_ (cost=0.00..1,405.94 rows=63,094 width=8) (actual time=0.018..11.976 rows=63,094 loops=1)

  • Output: employeeto2_.id, employeeto2_.employee_id
  • Buffers: shared hit=775
115. 8.612 16.868 ↑ 1.0 48,301 1

Hash (cost=962.01..962.01 rows=48,301 width=8) (actual time=16.868..16.868 rows=48,301 loops=1)

  • Output: employee3_.id, employee3_.individual_id
  • Buckets: 65536 Batches: 1 Memory Usage: 2399kB
  • Buffers: shared hit=479
116. 8.256 8.256 ↑ 1.0 48,301 1

Seq Scan on public.pim_employee employee3_ (cost=0.00..962.01 rows=48,301 width=8) (actual time=0.011..8.256 rows=48,301 loops=1)

  • Output: employee3_.id, employee3_.individual_id
  • Buffers: shared hit=479
117. 0.490 0.490 ↑ 1.0 1 98

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

  • 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=392
118. 0.000 0.000 ↑ 1.0 1 98

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

  • Output: clinic5_.id
  • Buffers: shared hit=3
119. 0.012 0.012 ↑ 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.011..0.012 rows=1 loops=1)

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

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

  • Output: organizati6_.short_name, organizati6_.id
  • Buffers: shared hit=3
121. 0.011 0.011 ↑ 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.009..0.011 rows=1 loops=1)

  • Output: organizati6_.short_name, organizati6_.id
  • Index Cond: (organizati6_.id = 134)
  • Buffers: shared hit=3
122. 0.092 0.098 ↑ 1.0 8 98

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

  • Output: careregime7_.code, careregime7_.id
  • Buffers: shared hit=1
123. 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
124. 0.126 0.194 ↑ 1.0 240 1

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

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

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

  • Output: medicalpro8_.name, medicalpro8_.id
  • Buffers: shared hit=6
126. 0.011 0.024 ↑ 1.0 28 1

Hash (cost=1.28..1.28 rows=28 width=146) (actual time=0.024..0.024 rows=28 loops=1)

  • Output: caseinitgo9_.name, caseinitgo9_.id
  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
  • Buffers: shared hit=1
127. 0.013 0.013 ↑ 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.008..0.013 rows=28 loops=1)

  • Output: caseinitgo9_.name, caseinitgo9_.id
  • Buffers: shared hit=1
128. 0.392 0.392 ↑ 1.0 1 98

Index Scan using mc_diagnosis_pk on public.mc_diagnosis casediagno10_ (cost=0.57..8.57 rows=1 width=20) (actual time=0.004..0.004 rows=1 loops=98)

  • 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=351
129. 0.091 0.098 ↑ 1.0 11 98

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

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

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

  • Output: diseasetyp11_.name, diseasetyp11_.id
  • Buffers: shared hit=1
131. 4.592 7.918 ↑ 1.0 14,919 1

Hash (cost=483.19..483.19 rows=14,919 width=92) (actual time=7.918..7.918 rows=14,919 loops=1)

  • Output: diagnosis12_.name, diagnosis12_.code, diagnosis12_.id
  • Buckets: 16384 Batches: 1 Memory Usage: 1969kB
  • Buffers: shared hit=334
132. 3.326 3.326 ↑ 1.0 14,919 1

Seq Scan on public.md_diagnosis diagnosis12_ (cost=0.00..483.19 rows=14,919 width=92) (actual time=0.007..3.326 rows=14,919 loops=1)

  • Output: diagnosis12_.name, diagnosis12_.code, diagnosis12_.id
  • Buffers: shared hit=334
133. 0.588 0.588 ↑ 1.0 1 98

Index Scan using mc_case_pk on public.mc_case medicalcas13_ (cost=0.56..8.56 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=98)

  • 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=491
134. 0.091 0.098 ↑ 1.0 7 98

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

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

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

  • Output: casestate14_.name, casestate14_.id
  • Buffers: shared hit=1
136. 0.882 0.882 ↑ 1.0 1 98

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

  • Output: patient15_.id
  • Index Cond: (patient15_.id = visit0_1_._patient_id)
  • Heap Fetches: 98
  • Buffers: shared hit=393
137. 0.784 0.784 ↑ 1.0 1 98

Index Scan using pim_individual_pk on public.pim_individual individual16_ (cost=0.43..4.87 rows=1 width=52) (actual time=0.008..0.008 rows=1 loops=98)

  • 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=392
138. 0.392 0.392 ↑ 1.0 1 98

Index Scan using mc_case_pk on public.mc_case medicalcas18_ (cost=0.56..8.57 rows=1 width=19) (actual time=0.003..0.004 rows=1 loops=98)

  • 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 ($6 OR $11)) OR ((medicalcas18_.is_social_significant = 2) AND ($13 OR $18)) OR ((m (...)
  • Buffers: shared hit=491
139.          

SubPlan (forNested Loop)

140. 0.098 2.450 ↓ 0.0 0 98

Limit (cost=8,950.42..8,950.42 rows=1 width=8) (actual time=0.025..0.025 rows=0 loops=98)

  • Output: r.bdate, mr.id
  • Buffers: shared hit=1541
141. 0.490 2.352 ↓ 0.0 0 98

Sort (cost=8,950.42..8,950.42 rows=1 width=8) (actual time=0.024..0.024 rows=0 loops=98)

  • Output: r.bdate, mr.id
  • Sort Key: mr.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1541
142. 0.082 1.862 ↓ 0.0 0 98

Nested Loop Semi Join (cost=2.13..8,950.41 rows=1 width=8) (actual time=0.019..0.019 rows=0 loops=98)

  • Output: r.bdate, mr.id
  • Join Filter: (r.service_id = mes.service_id)
  • Rows Removed by Join Filter: 0
  • Buffers: shared hit=1541
143. 0.190 0.980 ↑ 570.0 1 98

Nested Loop (cost=1.14..4,965.16 rows=570 width=16) (actual time=0.009..0.010 rows=1 loops=98)

  • Output: mr.id, mr.case_id, r.bdate, r.service_id
  • Buffers: shared hit=993
144. 0.490 0.490 ↑ 571.0 1 98

Index Scan using md_srv_rendered_step_id_idx on public.md_srv_rendered mr (cost=0.57..57.41 rows=571 width=8) (actual time=0.005..0.005 rows=1 loops=98)

  • Output: mr.id, mr.is_urgent, mr.is_use_cryogenic, mr.is_use_endoscopic, mr.is_use_laser, mr.anesthesia_type_id, mr.step_id, mr.complication_type_id, mr.diagnosis_id, mr.case_id, mr.referral_id, mr.result_catego (...)
  • Index Cond: (mr.step_id = visit0_.id)
  • Buffers: shared hit=492
145. 0.300 0.300 ↑ 1.0 1 100

Index Scan using sr_srv_rendered_pk on public.sr_srv_rendered r (cost=0.57..8.59 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=100)

  • Output: r.id, r.bdate, r.comment, r.cost, r.duration, r.edate, r.is_rendered, r.quantity, r.total_cost, r.contract_id, r.customer_id, r.funding_id, r.res_group_id, r.service_id, r.duration_measure_unit_id, r.be (...)
  • Index Cond: (r.id = mr.id)
  • Buffers: shared hit=501
146. 0.074 0.800 ↓ 0.0 0 100

Nested Loop (cost=0.99..6.98 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=100)

  • Output: mep.case_id, mes.service_id
  • Buffers: shared hit=548
147. 0.055 0.600 ↓ 0.0 0 100

Nested Loop (cost=0.71..6.67 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=100)

  • Output: mep.case_id, mesp.service_id
  • Buffers: shared hit=422
148. 0.400 0.400 ↓ 0.0 0 100

Index Scan using md_event_patient__case_id_ix on disp.md_event_patient mep (cost=0.42..6.12 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=100)

  • 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_who_cre (...)
  • Index Cond: (mep.case_id = mr.case_id)
  • Buffers: shared hit=329
149. 0.145 0.145 ↑ 8.0 1 29

Index Scan using md_event_service_patient__event_patient_id_ix on disp.md_event_service_patient mesp (cost=0.29..0.47 rows=8 width=8) (actual time=0.005..0.005 rows=1 loops=29)

  • 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)
  • Buffers: shared hit=93
150. 0.126 0.126 ↑ 1.0 1 42

Index Scan using md_event_service_pkey on disp.md_event_service mes (cost=0.28..0.30 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=42)

  • 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)
  • Buffers: shared hit=126