explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rgG3

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 2,467.233 ↑ 1.0 25 1

Limit (cost=175,999.44..175,999.50 rows=25 width=570) (actual time=2,467.229..2,467.233 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=1773799
  • cant.VenereologicalProfile'::text)
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
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. 1.948 2,467.231 ↑ 3.5 25 1

Sort (cost=175,480.04..175,480.26 rows=87 width=570) (actual time=2,467.227..2,467.231 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=1773799
94. 836.002 2,465.283 ↓ 1.5 129 1

Nested Loop (cost=17.53..175,477.59 rows=87 width=570) (actual time=17.988..2,465.283 rows=129 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=1773799
95. 0.377 25.037 ↓ 1.4 129 1

Nested Loop Left Join (cost=16.96..6,766.72 rows=91 width=559) (actual time=0.313..25.037 rows=129 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=5334
96. 0.444 23.628 ↓ 1.4 129 1

Nested Loop Left Join (cost=16.53..6,322.63 rows=91 width=511) (actual time=0.303..23.628 rows=129 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=4818
97. 0.395 21.378 ↓ 1.4 129 1

Nested Loop Left Join (cost=16.10..5,552.77 rows=91 width=507) (actual time=0.293..21.378 rows=129 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: 903
  • Buffers: shared hit=4302
98. 0.489 20.854 ↓ 1.4 129 1

Nested Loop Left Join (cost=16.10..5,542.13 rows=91 width=471) (actual time=0.282..20.854 rows=129 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=4301
99. 0.387 18.688 ↓ 1.4 129 1

Nested Loop Left Join (cost=15.53..4,760.21 rows=91 width=467) (actual time=0.275..18.688 rows=129 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=3653
100. 0.622 17.140 ↓ 1.4 129 1

Nested Loop Left Join (cost=15.25..4,338.73 rows=91 width=383) (actual time=0.271..17.140 rows=129 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: 1290
  • Buffers: shared hit=3266
101. 0.386 16.260 ↓ 1.4 129 1

Nested Loop Left Join (cost=15.25..4,322.58 rows=91 width=338) (actual time=0.264..16.260 rows=129 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=3265
102. 0.908 13.939 ↓ 1.4 129 1

Nested Loop Left Join (cost=14.68..3,540.43 rows=91 width=326) (actual time=0.254..13.939 rows=129 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: 3483
  • Buffers: shared hit=2620
103. 0.507 12.515 ↓ 1.4 129 1

Hash Left Join (cost=14.68..3,500.86 rows=91 width=184) (actual time=0.236..12.515 rows=129 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=2619
104. 0.375 11.897 ↓ 1.4 129 1

Nested Loop Left Join (cost=3.28..3,488.21 rows=91 width=102) (actual time=0.114..11.897 rows=129 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: 903
  • Buffers: shared hit=2613
105. 0.279 11.264 ↓ 1.4 129 1

Nested Loop Left Join (cost=3.28..3,476.19 rows=91 width=102) (actual time=0.101..11.264 rows=129 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=2612
106. 0.348 10.856 ↓ 1.4 129 1

Nested Loop Left Join (cost=2.98..3,466.51 rows=91 width=92) (actual time=0.086..10.856 rows=129 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=2609
107. 0.427 10.379 ↓ 1.4 129 1

Nested Loop Left Join (cost=2.71..3,456.85 rows=91 width=88) (actual time=0.070..10.379 rows=129 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=2606
108. 0.453 8.404 ↓ 1.4 129 1

Nested Loop Left Join (cost=2.28..2,850.35 rows=91 width=44) (actual time=0.059..8.404 rows=129 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=2090
109. 1.566 6.661 ↓ 1.4 129 1

Nested Loop Left Join (cost=1.99..2,423.58 rows=91 width=40) (actual time=0.050..6.661 rows=129 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=1703
  • -> Index Scan using pim_employee_position_pk on public.pim_employee_position employeeto2_ (cost=0.29..4.67 rows=1 width=8) (actual time=0.008..0.009 r (...)
110. 2.301 5.095 ↓ 1.4 129 1

Nested Loop Left Join (cost=1.70..1,997.94 rows=91 width=40) (actual time=0.044..5.095 rows=129 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=1316
  • -> 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.013..0.014 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=387
111. 1.117 2.794 ↓ 1.4 129 1

Nested Loop (cost=1.13..1,215.57 rows=91 width=40) (actual time=0.034..2.794 rows=129 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=671
  • -> Index Scan using mc_step__clinic_id_admission_date_outcome_date_ix on public.mc_step visit0_1_ (cost=0.56..390.69 rows=96 width=36) (ac (...)
  • 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=24
  • 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=645
112. 1.677 1.677 ↑ 1.0 1 129

Index Scan using plc_visit_pk on public.plc_visit visit0_ (cost=0.56..8.58 rows=1 width=8) (actual time=0.012..0.013 rows=1 loops=129)

  • 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=647
113. 1.290 1.290 ↑ 1.0 1 129

Index Scan using pim_employee_pk on public.pim_employee employee3_ (cost=0.29..4.68 rows=1 width=8) (actual time=0.009..0.010 rows=1 loops=129)

  • 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=387
114. 1.548 1.548 ↑ 1.0 1 129

Index Scan using pim_individual_pk on public.pim_individual individual4_ (cost=0.43..6.65 rows=1 width=52) (actual time=0.011..0.012 rows=1 loops=129)

  • 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=516
115. 0.122 0.129 ↑ 1.0 1 129

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

  • 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.121 0.129 ↑ 1.0 1 129

Materialize (cost=0.29..8.32 rows=1 width=18) (actual time=0.001..0.001 rows=1 loops=129)

  • 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.251 0.258 ↑ 1.0 8 129

Materialize (cost=0.00..1.12 rows=8 width=8) (actual time=0.000..0.002 rows=8 loops=129)

  • Output: careregime7_.code, careregime7_.id
  • Buffers: shared hit=1
120. 0.007 0.007 ↑ 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.007 rows=8 loops=1)

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

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

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

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

  • Output: medicalpro8_.name, medicalpro8_.id
  • Buffers: shared hit=6
123. 0.513 0.516 ↑ 1.0 28 129

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

  • Output: caseinitgo9_.name, caseinitgo9_.id
  • Buffers: shared hit=1
124. 0.003 0.003 ↑ 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.002..0.003 rows=28 loops=1)

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

Index Scan using mc_diagnosis_pk on public.mc_diagnosis casediagno10_ (cost=0.57..8.59 rows=1 width=20) (actual time=0.013..0.015 rows=1 loops=129)

  • 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=645
126. 0.251 0.258 ↑ 1.0 11 129

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

  • Output: diseasetyp11_.name, diseasetyp11_.id
  • Buffers: shared hit=1
127. 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.003..0.007 rows=11 loops=1)

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

Index Scan using md_diagnosis_pk on public.md_diagnosis diagnosis12_ (cost=0.29..4.62 rows=1 width=92) (actual time=0.008..0.009 rows=1 loops=129)

  • 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=387
129. 1.677 1.677 ↑ 1.0 1 129

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

  • 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=648
130. 0.125 0.129 ↑ 1.0 7 129

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

  • Output: casestate14_.name, casestate14_.id
  • Buffers: shared hit=1
131. 0.004 0.004 ↑ 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.004 rows=7 loops=1)

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

Index Only Scan using pci_patient_pkey on public.pci_patient patient15_ (cost=0.43..8.45 rows=1 width=4) (actual time=0.012..0.014 rows=1 loops=129)

  • Output: patient15_.id
  • Index Cond: (patient15_.id = visit0_1_._patient_id)
  • Heap Fetches: 129
  • Buffers: shared hit=516
133. 1.032 1.032 ↑ 1.0 1 129

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

  • 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=516
134. 1.032 1.032 ↑ 1.0 1 129

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

  • 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 ($3 OR $8)) OR ((medicalcas18_.is_social_significant = 2) AND ($10 OR $15)) OR ((me (...)
  • Buffers: shared hit=648
135.          

SubPlan (forNested Loop)

136. 0.387 1,603.212 ↓ 0.0 0 129

Limit (cost=1,928.95..1,928.95 rows=1 width=8) (actual time=12.428..12.428 rows=0 loops=129)

  • Output: ssr.bdate, msr.id
  • Buffers: shared hit=1529295
137. 1.290 1,602.825 ↓ 0.0 0 129

Sort (cost=1,928.95..1,929.15 rows=81 width=8) (actual time=12.425..12.425 rows=0 loops=129)

  • Output: ssr.bdate, msr.id
  • Sort Key: msr.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1529295
138. 0.516 1,601.535 ↓ 0.0 0 129

Nested Loop (cost=85.54..1,928.54 rows=81 width=8) (actual time=12.415..12.415 rows=0 loops=129)

  • Output: ssr.bdate, msr.id
  • Buffers: shared hit=1529295
139. 265.353 1,601.019 ↓ 0.0 0 129

Merge Join (cost=84.98..1,232.35 rows=81 width=4) (actual time=12.411..12.411 rows=0 loops=129)

  • Output: msr.id
  • Merge Cond: (mep.case_id = msr.case_id)
  • Buffers: shared hit=1529295
140. 1,333.989 1,333.989 ↑ 5.5 24,623 129

Index Only Scan using md_event_patient__case_id_ix on disp.md_event_patient mep (cost=0.42..6,039.28 rows=136,467 width=4) (actual time=0.016..10.341 rows=24,623 loops=129)

  • Output: mep.case_id
  • Heap Fetches: 3176367
  • Buffers: shared hit=1528650
141. 0.903 1.677 ↑ 571.0 1 129

Sort (cost=83.56..84.98 rows=571 width=8) (actual time=0.013..0.013 rows=1 loops=129)

  • Output: msr.id, msr.case_id
  • Sort Key: msr.case_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=645
142. 0.774 0.774 ↑ 571.0 1 129

Index Scan using md_srv_rendered_step_id_idx on public.md_srv_rendered msr (cost=0.57..57.41 rows=571 width=8) (actual time=0.006..0.006 rows=1 loops=129)

  • Output: msr.id, msr.case_id
  • Index Cond: (msr.step_id = visit0_.id)
  • Buffers: shared hit=645
143. 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=8) (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)