explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PJZi

Settings
# exclusive inclusive rows x rows loops node
1. 0.059 24,636.705 ↓ 6.3 57 1

Sort (cost=994,122.94..994,122.97 rows=9 width=176) (actual time=24,636.701..24,636.705 rows=57 loops=1)

  • Sort Key: list.created_at DESC
  • Sort Method: quicksort Memory: 61kB
  • Buffers: shared hit=5,733,933
2.          

CTE tasks

3. 0.010 3,502.635 ↓ 16.8 67 1

Append (cost=5.92..279.05 rows=4 width=271) (actual time=2,850.569..3,502.635 rows=67 loops=1)

  • Buffers: shared hit=2,855,790
4. 0.013 3,502.554 ↓ 67.0 67 1

Subquery Scan on *SELECT* 1 (cost=5.92..143.7 rows=1 width=730) (actual time=2,850.568..3,502.554 rows=67 loops=1)

  • Buffers: shared hit=2,855,775
5. 9.265 3,502.541 ↓ 67.0 67 1

Nested Loop (cost=5.92..143.69 rows=1 width=730) (actual time=2,850.567..3,502.541 rows=67 loops=1)

  • Buffers: shared hit=2,855,775
6. 0.080 0.661 ↓ 145.0 145 1

Nested Loop (cost=1.23..49.7 rows=1 width=180) (actual time=0.041..0.661 rows=145 loops=1)

  • Buffers: shared hit=288
7. 0.073 0.349 ↓ 29.0 29 1

Nested Loop (cost=0.96..41.4 rows=1 width=147) (actual time=0.033..0.349 rows=29 loops=1)

  • Buffers: shared hit=143
8. 0.045 0.247 ↓ 29.0 29 1

Nested Loop (cost=0.96..40.15 rows=1 width=119) (actual time=0.029..0.247 rows=29 loops=1)

  • Buffers: shared hit=114
9. 0.021 0.115 ↓ 29.0 29 1

Nested Loop (cost=0.68..31.8 rows=1 width=86) (actual time=0.024..0.115 rows=29 loops=1)

  • Buffers: shared hit=27
10. 0.004 0.059 ↓ 5.0 5 1

Nested Loop (cost=0.55..31.6 rows=1 width=86) (actual time=0.019..0.059 rows=5 loops=1)

  • Buffers: shared hit=17
11. 0.002 0.044 ↑ 1.0 1 1

Nested Loop (cost=0.27..23.3 rows=1 width=82) (actual time=0.011..0.044 rows=1 loops=1)

  • Buffers: shared hit=14
12. 0.005 0.005 ↑ 1.0 1 1

Index Only Scan using users_address_key on users users (cost=0.27..8.29 rows=1 width=41) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (users.address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Heap Fetches: 1
  • Buffers: shared hit=3
13. 0.037 0.037 ↑ 1.0 1 1

Seq Scan on organization_users org_users (cost=0..15 rows=1 width=82) (actual time=0.004..0.037 rows=1 loops=1)

  • Filter: ((org_users.user_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Buffers: shared hit=11
14. 0.011 0.011 ↓ 5.0 5 1

Index Only Scan using user_roles_pkey on user_roles user_roles (cost=0.27..8.29 rows=1 width=45) (actual time=0.006..0.011 rows=5 loops=1)

  • Index Cond: (user_roles.organization_address = (org_users.organization_address)::text)
  • Heap Fetches: 5
  • Buffers: shared hit=3
15. 0.035 0.035 ↓ 6.0 6 5

Index Only Scan using capabilities_to_roles_pkey on capabilities_to_roles cr (cost=0.14..0.19 rows=1 width=8) (actual time=0.002..0.007 rows=6 loops=5)

  • Index Cond: (cr.role_id = user_roles.role_id)
  • Heap Fetches: 29
  • Buffers: shared hit=10
16. 0.087 0.087 ↑ 1.0 1 29

Index Scan using organization_accounts_pkey on organization_accounts orgs (cost=0.27..8.29 rows=1 width=74) (actual time=0.003..0.003 rows=1 loops=29)

  • Index Cond: ((orgs.organization_address)::text = (org_users.organization_address)::text)
  • Buffers: shared hit=87
17. 0.029 0.029 ↑ 1.8 6 29

Seq Scan on capabilities capabilities (cost=0..1.11 rows=11 width=36) (actual time=0.001..0.001 rows=6 loops=29)

  • Buffers: shared hit=29
18. 0.232 0.232 ↓ 5.0 5 29

Index Only Scan using department_users_pkey on department_users dep_users (cost=0.27..8.29 rows=1 width=115) (actual time=0.004..0.008 rows=5 loops=29)

  • Index Cond: ((dep_users.organization_address = (org_users.organization_address)::text) AND (dep_users.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
  • Heap Fetches: 145
  • Buffers: shared hit=145
19. 5.220 3,492.615 ↓ 302.0 302 145

Nested Loop (cost=4.69..85.64 rows=1 width=808) (actual time=0.026..24.087 rows=302 loops=145)

  • Buffers: shared hit=2,855,487
20. 42.340 3,443.605 ↓ 302.0 302 145

Nested Loop (cost=4.54..85.33 rows=1 width=830) (actual time=0.025..23.749 rows=302 loops=145)

  • Buffers: shared hit=2,767,907
21. 7.540 3,357.475 ↓ 302.0 302 145

Nested Loop (cost=4.41..85.1 rows=1 width=1,403) (actual time=0.023..23.155 rows=302 loops=145)

  • Buffers: shared hit=2,680,182
22. 8.990 3,262.355 ↓ 302.0 302 145

Nested Loop (cost=4.13..84.66 rows=1 width=1,348) (actual time=0.021..22.499 rows=302 loops=145)

  • Buffers: shared hit=2,548,812
23. 16.385 3,165.785 ↓ 302.0 302 145

Nested Loop (cost=3.86..84.05 rows=1 width=1,430) (actual time=0.018..21.833 rows=302 loops=145)

  • Buffers: shared hit=2,417,442
24. 1,549.615 3,061.820 ↓ 302.0 302 145

Nested Loop (cost=3.59..83.53 rows=1 width=1,389) (actual time=0.016..21.116 rows=302 loops=145)

  • Buffers: shared hit=2,286,072
25. 0.000 417.455 ↓ 302.0 302 145

Nested Loop (cost=3.59..38.03 rows=1 width=1,307) (actual time=0.012..2.879 rows=302 loops=145)

  • Buffers: shared hit=578,262
26. 39.829 52.780 ↓ 330.2 1,321 145

Hash Join (cost=3.32..35.87 rows=4 width=1,266) (actual time=0.002..0.364 rows=1,321 loops=145)

  • Buffers: shared hit=3,627
27. 12.905 12.905 ↑ 1.0 302 145

Seq Scan on activity_instances ai (cost=0..31.35 rows=302 width=136) (actual time=0.001..0.089 rows=302 loops=145)

  • Filter: (ai.state = 4)
  • Buffers: shared hit=3,625
28. 0.008 0.046 ↓ 41.0 41 1

Hash (cost=3.3..3.3 rows=1 width=1,130) (actual time=0.046..0.046 rows=41 loops=1)

  • Buffers: shared hit=2
29. 0.020 0.038 ↓ 41.0 41 1

Hash Join (cost=1.57..3.3 rows=1 width=1,130) (actual time=0.021..0.038 rows=41 loops=1)

  • Buffers: shared hit=2
30. 0.004 0.004 ↑ 1.0 41 1

Seq Scan on activity_details actd (cost=0..1.41 rows=41 width=2,064) (actual time=0.002..0.004 rows=41 loops=1)

  • Buffers: shared hit=1
31. 0.009 0.014 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=262) (actual time=0.014..0.014 rows=23 loops=1)

  • Buffers: shared hit=1
32. 0.005 0.005 ↑ 1.0 23 1

Seq Scan on process_definitions pd (cost=0..1.23 rows=23 width=262) (actual time=0.003..0.005 rows=23 loops=1)

  • Buffers: shared hit=1
33. 383.090 383.090 ↑ 1.0 1 191,545

Index Scan using process_instances_pkey on process_instances pi (cost=0.27..0.53 rows=1 width=82) (actual time=0.001..0.002 rows=1 loops=191,545)

  • Index Cond: ((pi.process_instance_address)::text = (ai.process_instance_address)::text)
  • Buffers: shared hit=574,635
34. 1,094.750 1,094.750 ↑ 1.0 260 43,790

Seq Scan on agreements ag (cost=0..41.6 rows=260 width=164) (actual time=0..0.025 rows=260 loops=43,790)

  • Buffers: shared hit=1,707,810
35. 87.580 87.580 ↑ 1.0 1 43,790

Index Only Scan using archetype_details_pkey on archetype_details ard (cost=0.27..0.52 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=43,790)

  • Index Cond: (ard.address = (ag.archetype_address)::text)
  • Heap Fetches: 43,790
  • Buffers: shared hit=131,370
36. 87.580 87.580 ↑ 1.0 1 43,790

Index Only Scan using archetypes_pkey on archetypes ar (cost=0.27..0.59 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=43,790)

  • Index Cond: (ar.archetype_address = (ard.address)::text)
  • Heap Fetches: 43,790
  • Buffers: shared hit=131,370
37. 87.580 87.580 ↑ 1.0 1 43,790

Index Scan using agreement_details_pkey on agreement_details agd (cost=0.27..0.44 rows=1 width=96) (actual time=0.002..0.002 rows=1 loops=43,790)

  • Index Cond: ((agd.address)::text = (ag.agreement_address)::text)
  • Buffers: shared hit=131,370
38. 43.790 43.790 ↓ 2.0 2 43,790

Index Scan using activity_definitions_pkey on activity_definitions ad (cost=0.14..0.21 rows=1 width=262) (actual time=0.001..0.001 rows=2 loops=43,790)

  • Index Cond: ((ad.activity_id)::text = (ai.activity_id)::text)
  • Buffers: shared hit=87,725
39. 43.790 43.790 ↓ 0.0 0 43,790

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_7 (cost=0.14..0.31 rows=1 width=310) (actual time=0.001..0.001 rows=0 loops=43,790)

  • Index Cond: (((scopes_7.entity_address)::text = (ai.process_instance_address)::text) AND ((scopes_7.scope_address)::text = (ai.performer)::text) AND ((scopes_7.scope_context)::text = (ai.activity_id)::text))
  • Buffers: shared hit=87,580
40.          

SubPlan (for Nested Loop)

41. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_departments_pkey on organization_departments od (cost=0.27..8.29 rows=1 width=0) (never executed)

  • Index Cond: ((od.organization_address = (ai.performer)::text) AND (od.department_id = scopes_7.fixed_scope))
42. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on organization_departments od_1 (cost=0..14.04 rows=304 width=65) (never executed)

43. 0.000 0.022 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2_1 (cost=1.14..4.67 rows=1 width=271) (actual time=0.022..0.022 rows=0 loops=1)

  • Buffers: shared hit=2
44. 0.006 0.022 ↓ 0.0 0 1

Hash Join (cost=1.14..4.66 rows=1 width=271) (actual time=0.022..0.022 rows=0 loops=1)

  • Buffers: shared hit=2
45. 0.003 0.003 ↑ 39.0 1 1

Seq Scan on agreement_drafts drafts (cost=0..3.39 rows=39 width=36) (actual time=0.003..0.003 rows=1 loops=1)

  • Buffers: shared hit=1
46. 0.000 0.013 ↓ 0.0 0 1

Hash (cost=1.12..1.12 rows=1 width=110) (actual time=0.013..0.013 rows=0 loops=1)

  • Buffers: shared hit=1
47. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on agreement_draft_approval_jobs jobs (cost=0..1.12 rows=1 width=110) (actual time=0.013..0.013 rows=0 loops=1)

  • Filter: ((jobs.approver_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Buffers: shared hit=1
48. 0.000 0.038 ↓ 0.0 0 1

Nested Loop (cost=2.04..62.32 rows=1 width=271) (actual time=0.038..0.038 rows=0 loops=1)

  • Filter: (((COALESCE(target_users.address, target_organizations.user_address))::text = (connections.target)::text) OR (c.name = 'team_asset_map:update'::text))
  • Buffers: shared hit=12
49. 0.001 0.038 ↓ 0.0 0 1

Nested Loop (cost=2.04..61.01 rows=1 width=192) (actual time=0.038..0.038 rows=0 loops=1)

  • Buffers: shared hit=12
50. 0.000 0.037 ↓ 0.0 0 1

Nested Loop (cost=1.91..60.81 rows=1 width=192) (actual time=0.037..0.037 rows=0 loops=1)

  • Buffers: shared hit=12
51. 0.000 0.037 ↓ 0.0 0 1

Nested Loop (cost=1.64..57.76 rows=1 width=188) (actual time=0.037..0.037 rows=0 loops=1)

  • Buffers: shared hit=12
52. 0.000 0.037 ↓ 0.0 0 1

Nested Loop (cost=1.36..49.41 rows=1 width=200) (actual time=0.037..0.037 rows=0 loops=1)

  • Buffers: shared hit=12
53. 0.000 0.037 ↓ 0.0 0 1

Nested Loop (cost=1.09..41.07 rows=1 width=172) (actual time=0.037..0.037 rows=0 loops=1)

  • Buffers: shared hit=12
54. 0.002 0.037 ↓ 0.0 0 1

Nested Loop (cost=0.82..32.77 rows=1 width=172) (actual time=0.037..0.037 rows=0 loops=1)

  • Filter: ((COALESCE(target_users.address, target_organizations.user_address))::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Buffers: shared hit=12
55. 0.002 0.033 ↑ 1.0 1 1

Nested Loop (cost=0.55..24.47 rows=1 width=131) (actual time=0.032..0.033 rows=1 loops=1)

  • Buffers: shared hit=10
56. 0.003 0.027 ↑ 1.0 1 1

Nested Loop (cost=0.27..16.17 rows=1 width=90) (actual time=0.026..0.027 rows=1 loops=1)

  • Buffers: shared hit=7
57. 0.016 0.016 ↑ 1.0 1 1

Seq Scan on business_connections connections (cost=0..7.83 rows=1 width=90) (actual time=0.016..0.016 rows=1 loops=1)

  • Filter: (connections.state = 0)
  • Buffers: shared hit=5
58. 0.008 0.008 ↓ 0.0 0 1

Index Only Scan using users_address_key on users source_users_1 (cost=0.27..8.29 rows=1 width=41) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (source_users_1.address = (connections.source)::text)
  • Buffers: shared hit=2
59. 0.004 0.004 ↑ 1.0 1 1

Index Only Scan using organization_users_pkey on organization_users target_organizations (cost=0.27..8.29 rows=1 width=82) (actual time=0.003..0.004 rows=1 loops=1)

  • Index Cond: (target_organizations.organization_address = (connections.target)::text)
  • Heap Fetches: 1
  • Buffers: shared hit=3
60. 0.002 0.002 ↓ 0.0 0 1

Index Only Scan using users_address_key on users target_users (cost=0.27..8.29 rows=1 width=41) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (target_users.address = (connections.target)::text)
  • Buffers: shared hit=2
61. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_users_pkey on organization_users source_organizations (cost=0.27..8.29 rows=1 width=41) (never executed)

  • Index Cond: (source_organizations.organization_address = (connections.source)::text)
62. 0.000 0.000 ↓ 0.0 0 0

Index Scan using users_address_key on users source_users (cost=0.27..8.29 rows=1 width=69) (never executed)

  • Index Cond: ((source_users.address)::text = (connections.source)::text)
63. 0.000 0.000 ↓ 0.0 0 0

Index Scan using "organizationsIndex_address" on organizations source_orgs (cost=0.27..8.29 rows=1 width=70) (never executed)

  • Index Cond: ((source_orgs.address)::text = (connections.source)::text)
64. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using user_roles_pkey on user_roles roles (cost=0.27..3.04 rows=1 width=86) (never executed)

  • Index Cond: (roles.user_address = (COALESCE(target_users.address, target_organizations.user_address))::text)
65. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using capabilities_to_roles_pkey on capabilities_to_roles cr_1 (cost=0.14..0.19 rows=1 width=8) (never executed)

  • Index Cond: (cr_1.role_id = roles.role_id)
66. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on capabilities c (cost=0..1.11 rows=11 width=36) (never executed)

67. 0.000 0.011 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4 (cost=68.29..68.34 rows=1 width=303) (actual time=0.011..0.011 rows=0 loops=1)

  • Buffers: shared hit=1
68. 0.000 0.011 ↓ 0.0 0 1

Subquery Scan on renewal_tasks_view (cost=68.29..68.32 rows=1 width=303) (actual time=0.011..0.011 rows=0 loops=1)

  • Buffers: shared hit=1
69. 0.001 0.011 ↓ 0.0 0 1

Unique (cost=68.29..68.31 rows=1 width=341) (actual time=0.011..0.011 rows=0 loops=1)

  • Buffers: shared hit=1
70. 0.005 0.010 ↓ 0.0 0 1

Sort (cost=68.29..68.29 rows=1 width=341) (actual time=0.01..0.01 rows=0 loops=1)

  • Sort Key: re.agreement_address, details.name, fr.franchisee, re.renewal_window_open, re.opened_at, ((('/agreements/'::text || (re.agreement_address)::text) || '/renew'::text)), (date_part('epoch'::text, (timezone('UTC'::text, to_timestamp((re.expiration_date)::double precision)) + (re.closes_at_offset)::interval)))
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
71. 0.000 0.005 ↓ 0.0 0 1

Nested Loop (cost=17.41..68.28 rows=1 width=341) (actual time=0.005..0.005 rows=0 loops=1)

  • Buffers: shared hit=1
72. 0.000 0.005 ↓ 0.0 0 1

Nested Loop (cost=17.41..67.11 rows=1 width=345) (actual time=0.005..0.005 rows=0 loops=1)

  • Buffers: shared hit=1
73. 0.001 0.005 ↓ 0.0 0 1

Nested Loop (cost=17.41..65.68 rows=1 width=345) (actual time=0.005..0.005 rows=0 loops=1)

  • Buffers: shared hit=1
74. 0.000 0.004 ↓ 0.0 0 1

Hash Join (cost=17.13..57.38 rows=1 width=382) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: (((fr.franchisee)::text = (users_1.address)::text) OR (((fr.franchisee)::text = (org_users_1.organization_address)::text) AND ((alternatives: SubPlan 3 or hashed SubPlan 4) OR (alternatives: SubPlan 5 or hashed SubPlan 6) OR ((upper(encode(dep_users_1.department_id, 'hex'::text)) = 'B9BCC702D24032F3F4E8729FBB791B2834D49FD3EC7F4370818EAF181F2B4A30'::text) AND ((NOT (alternatives: SubPlan 7 or hashed SubPlan 8)) OR (NOT (SubPlan 9)))))))
  • Buffers: shared hit=1
75. 0.000 0.004 ↓ 0.0 0 1

Nested Loop (cost=0.95..41.19 rows=1 width=513) (actual time=0.004..0.004 rows=0 loops=1)

  • Buffers: shared hit=1
76. 0.000 0.004 ↓ 0.0 0 1

Nested Loop (cost=0.67..32.88 rows=1 width=480) (actual time=0.004..0.004 rows=0 loops=1)

  • Buffers: shared hit=1
77. 0.000 0.004 ↓ 0.0 0 1

Nested Loop (cost=0.67..17.87 rows=1 width=439) (actual time=0.004..0.004 rows=0 loops=1)

  • Buffers: shared hit=1
78. 0.001 0.004 ↓ 0.0 0 1

Nested Loop (cost=0.4..9.57 rows=1 width=398) (actual time=0.004..0.004 rows=0 loops=1)

  • Buffers: shared hit=1
79. 0.000 0.003 ↓ 0.0 0 1

Nested Loop (cost=0.27..9.36 rows=1 width=243) (actual time=0.003..0.003 rows=0 loops=1)

  • Buffers: shared hit=1
80. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on agreement_renewals re (cost=0..1.01 rows=1 width=147) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: re.renewal_window_open
  • Buffers: shared hit=1
81. 0.000 0.000 ↓ 0.0 0 0

Index Scan using agreement_details_pkey on agreement_details details (cost=0.27..8.29 rows=1 width=96) (never executed)

  • Index Cond: ((details.address)::text = (re.agreement_address)::text)
82. 0.000 0.000 ↓ 0.0 0 0

Index Scan using agreement_to_franchisee_pkey on agreement_to_franchisee fr (cost=0.13..0.19 rows=1 width=196) (never executed)

  • Index Cond: ((fr.agreement_address)::text = (details.address)::text)
  • Filter: ((fr.voter IS NULL) OR ((fr.voter)::text = '0000000000000000000000000000000000000000'::text))
83. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using users_address_key on users users_1 (cost=0.27..8.29 rows=1 width=41) (never executed)

  • Index Cond: (users_1.address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
84. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on organization_users org_users_1 (cost=0..15 rows=1 width=82) (never executed)

  • Filter: ((org_users_1.user_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
85. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using department_users_pkey on department_users dep_users_1 (cost=0.27..8.29 rows=1 width=115) (never executed)

  • Index Cond: ((dep_users_1.organization_address = (org_users_1.organization_address)::text) AND (dep_users_1.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
86. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=12.75..12.75 rows=275 width=74) (never executed)

87. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on organization_accounts orgs_1 (cost=0..12.75 rows=275 width=74) (never executed)

88.          

SubPlan (for Hash Join)

89. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes (cost=0.14..8.16 rows=1 width=0) (never executed)

  • Index Cond: (((scopes.entity_address)::text = (fr.agreement_address)::text) AND ((scopes.scope_context)::text = 'AGREEMENT_PARTIES'::text))
  • Filter: (scopes.fixed_scope = orgs_1.organization_id)
90. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_1 (cost=0.14..8.9 rows=1 width=64) (never executed)

  • Index Cond: ((scopes_1.scope_context)::text = 'AGREEMENT_PARTIES'::text)
91. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_2 (cost=0.14..8.16 rows=1 width=0) (never executed)

  • Index Cond: (((scopes_2.entity_address)::text = (fr.agreement_address)::text) AND ((scopes_2.scope_context)::text = 'AGREEMENT_PARTIES'::text))
  • Filter: (scopes_2.fixed_scope = dep_users_1.department_id)
92. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_3 (cost=0.14..8.9 rows=1 width=64) (never executed)

  • Index Cond: ((scopes_3.scope_context)::text = 'AGREEMENT_PARTIES'::text)
93. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using entities_address_scopes_pkey on entities_address_scopes scopes_4 (cost=0.14..8.16 rows=1 width=0) (never executed)

  • Index Cond: ((scopes_4.entity_address = (fr.agreement_address)::text) AND (scopes_4.scope_context = 'AGREEMENT_PARTIES'::text))
94. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using entities_address_scopes_pkey on entities_address_scopes scopes_5 (cost=0.14..8.9 rows=1 width=32) (never executed)

  • Index Cond: (scopes_5.scope_context = 'AGREEMENT_PARTIES'::text)
95. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.42..16.46 rows=1 width=0) (never executed)

96. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_6 (cost=0.14..8.16 rows=1 width=32) (never executed)

  • Index Cond: (((scopes_6.entity_address)::text = (fr.agreement_address)::text) AND ((scopes_6.scope_context)::text = 'AGREEMENT_PARTIES'::text))
97. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_departments_pkey on organization_departments od_2 (cost=0.27..8.29 rows=1 width=33) (never executed)

  • Index Cond: (od_2.organization_address = (fr.franchisee)::text)
98. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using user_roles_pkey on user_roles user_roles_1 (cost=0.27..8.29 rows=1 width=86) (never executed)

  • Index Cond: ((user_roles_1.organization_address = (org_users_1.organization_address)::text) AND (user_roles_1.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
99. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on capabilities_to_roles cr_2 (cost=0..1.19 rows=19 width=8) (never executed)

100. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on capabilities capabilities_1 (cost=0..1.14 rows=1 width=4) (never executed)

  • Filter: (capabilities_1.name = 'signature:create'::text)
101. 0.461 24,636.646 ↓ 6.3 57 1

Subquery Scan on list (cost=4.85..993,843.71 rows=9 width=176) (actual time=24,148.514..24,636.646 rows=57 loops=1)

  • Filter: (list.name ~~* '%NDA%'::text)
  • Buffers: shared hit=5,733,933
102. 0.024 24,636.185 ↑ 1.4 162 1

Append (cost=4.85..993,840.82 rows=229 width=144) (actual time=24,146.236..24,636.185 rows=162 loops=1)

  • Buffers: shared hit=5,733,933
103. 0.001 16,949.932 ↓ 0.0 0 1

Nested Loop (cost=4.85..17.82 rows=1 width=144) (actual time=16,949.932..16,949.932 rows=0 loops=1)

  • Buffers: shared hit=1
104. 16,949.931 16,949.931 ↓ 0.0 0 1

Seq Scan on agreement_draft_approval_jobs aj (cost=0..1.12 rows=1 width=4) (actual time=16,949.931..16,949.931 rows=0 loops=1)

  • Filter: ((aj.approver_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Buffers: shared hit=1
105. 0.000 0.000 ↓ 0.0 0 0

HashAggregate (cost=4.85..16.38 rows=10 width=80) (never executed)

  • Group Key: agreement_drafts.id
106. 0.000 0.000 ↓ 0.0 0 0

Hash Join (cost=1.23..4.83 rows=10 width=44) (never executed)

107. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on agreement_drafts agreement_drafts (cost=0..3.39 rows=39 width=44) (never executed)

108. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=1.1..1.1 rows=10 width=4) (never executed)

109. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on agreement_draft_approval_jobs agreement_draft_approval_jobs (cost=0..1.1 rows=10 width=4) (never executed)

110.          

SubPlan (for HashAggregate)

111. 0.000 0.000 ↓ 0.0 0 0

Aggregate (cost=1.13..1.14 rows=1 width=32) (never executed)

112. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on agreement_draft_approval_jobs agreement_draft_approval_jobs_1 (cost=0..1.12 rows=1 width=98) (never executed)

  • Filter: (agreement_draft_approval_jobs_1.agreement_draft_id = agreement_drafts.id)
113.          

SubPlan (for Nested Loop)

114. 0.000 0.000 ↓ 0.0 0 0

Limit (cost=0..0.09 rows=1 width=32) (never executed)

115. 0.000 0.000 ↓ 0.0 0 0

CTE Scan on tasks tasks (cost=0..0.09 rows=1 width=32) (never executed)

  • Filter: (tasks.agreement_draft_id = agreement_drafts.id)
116. 0.030 7,686.229 ↑ 1.4 162 1

Subquery Scan on *SELECT* 2 (cost=58,620.46..993,821.85 rows=228 width=153) (actual time=7,196.304..7,686.229 rows=162 loops=1)

  • Buffers: shared hit=5,733,932
117. 0.398 7,686.199 ↑ 1.4 162 1

Group (cost=58,620.46..993,819.57 rows=228 width=176) (actual time=7,196.302..7,686.199 rows=162 loops=1)

  • Group Key: agreements.agreement_address, agreement_details.name, agreement_details.created_at
  • Buffers: shared hit=5,733,932
118. 0.174 3,690.557 ↑ 1.4 162 1

Sort (cost=58,620.46..58,621.03 rows=228 width=108) (actual time=3,690.529..3,690.557 rows=162 loops=1)

  • Sort Key: agreements.agreement_address, agreement_details.name, agreement_details.created_at
  • Sort Method: quicksort Memory: 63kB
  • Buffers: shared hit=2,865,784
119. 0.126 3,690.383 ↑ 1.4 162 1

Nested Loop (cost=0.27..58,611.53 rows=228 width=108) (actual time=3,690.003..3,690.383 rows=162 loops=1)

  • Buffers: shared hit=2,865,784
120. 8.754 3,690.095 ↑ 1.4 162 1

Seq Scan on agreements agreements (cost=0..58,505.61 rows=228 width=45) (actual time=3,689.998..3,690.095 rows=162 loops=1)

  • Filter: ((alternatives: SubPlan 20 or hashed SubPlan 24) OR (alternatives: SubPlan 32 or hashed SubPlan 40) OR (alternatives: SubPlan 43 or hashed SubPlan 46))
  • Buffers: shared hit=2,865,298
121.          

SubPlan (for Seq Scan)

122. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.36..43.63 rows=1 width=0) (never executed)

  • Filter: ((NOT (alternatives: SubPlan 17 or hashed SubPlan 18)) OR (SubPlan 19))
123. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.09..25.77 rows=1 width=123) (never executed)

124. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.82..24.94 rows=1 width=123) (never executed)

125. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.55..16.64 rows=1 width=82) (never executed)

126. 0.000 0.000 ↓ 0.0 0 0

Index Scan using agreements_pkey on agreements agr (cost=0.27..8.29 rows=1 width=41) (never executed)

  • Index Cond: ((agr.agreement_address)::text = (agreements.agreement_address)::text)
127. 0.000 0.000 ↓ 0.0 0 0

Index Scan using archetypes_pkey on archetypes arch (cost=0.27..8.29 rows=1 width=82) (never executed)

  • Index Cond: ((arch.archetype_address)::text = (agr.archetype_address)::text)
128. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using users_address_key on users users_3 (cost=0.27..8.29 rows=1 width=41) (never executed)

  • Index Cond: (users_3.address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
129. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_users_pkey on organization_users org_users_3 (cost=0.27..0.55 rows=1 width=82) (never executed)

  • Index Cond: ((org_users_3.organization_address = (arch.owner)::text) AND (org_users_3.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
130. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using department_users_pkey on department_users dep_users_3 (cost=0.27..8.29 rows=1 width=115) (never executed)

  • Index Cond: ((dep_users_3.organization_address = (org_users_3.organization_address)::text) AND (dep_users_3.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
131.          

SubPlan (for Nested Loop)

132. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on archetype_restrictions res (cost=0..6.36 rows=1 width=0) (never executed)

  • Filter: ((res.address)::text = (arch.archetype_address)::text)
133. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on archetype_restrictions res_1 (cost=0..5.89 rows=189 width=32) (never executed)

134. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on archetype_restrictions res_2 (cost=0..6.36 rows=1 width=65) (never executed)

  • Filter: ((res_2.address)::text = (arch.archetype_address)::text)
135. 2.585 89.083 ↓ 81.0 162 1

Hash Join (cost=50.95..111.22 rows=2 width=32) (actual time=77.36..89.083 rows=162 loops=1)

  • Filter: ((NOT (alternatives: SubPlan 21 or hashed SubPlan 22)) OR (SubPlan 23))
  • Buffers: shared hit=3,050
136. 0.021 39.431 ↓ 54.0 162 1

Nested Loop (cost=34.85..85.51 rows=3 width=164) (actual time=39.277..39.431 rows=162 loops=1)

  • Buffers: shared hit=69
137. 0.012 0.012 ↑ 1.0 1 1

Index Only Scan using users_address_key on users users_4 (cost=0.27..8.29 rows=1 width=41) (actual time=0.01..0.012 rows=1 loops=1)

  • Index Cond: (users_4.address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Heap Fetches: 1
  • Buffers: shared hit=3
138. 0.099 39.398 ↓ 54.0 162 1

Hash Join (cost=34.58..77.19 rows=3 width=164) (actual time=39.266..39.398 rows=162 loops=1)

  • Buffers: shared hit=66
139. 0.047 0.047 ↑ 1.0 260 1

Seq Scan on agreements agr_1 (cost=0..41.6 rows=260 width=82) (actual time=0.006..0.047 rows=260 loops=1)

  • Buffers: shared hit=39
140. 0.036 39.252 ↓ 54.0 162 1

Hash (cost=34.54..34.54 rows=3 width=123) (actual time=39.252..39.252 rows=162 loops=1)

  • Buffers: shared hit=27
141. 0.069 39.216 ↓ 54.0 162 1

Hash Join (cost=15.01..34.54 rows=3 width=123) (actual time=39.125..39.216 rows=162 loops=1)

  • Buffers: shared hit=27
142. 0.033 0.033 ↑ 1.0 277 1

Seq Scan on archetypes arch_1 (cost=0..18.77 rows=277 width=82) (actual time=0.006..0.033 rows=277 loops=1)

  • Buffers: shared hit=16
143. 0.005 39.114 ↑ 1.0 1 1

Hash (cost=15..15 rows=1 width=82) (actual time=39.114..39.114 rows=1 loops=1)

  • Buffers: shared hit=11
144. 39.109 39.109 ↑ 1.0 1 1

Seq Scan on organization_users org_users_4 (cost=0..15 rows=1 width=82) (actual time=39.072..39.109 rows=1 loops=1)

  • Filter: ((org_users_4.user_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Buffers: shared hit=11
145. 0.003 0.041 ↑ 1.0 5 1

Hash (cost=16.02..16.02 rows=5 width=115) (actual time=0.041..0.041 rows=5 loops=1)

  • Buffers: shared hit=12
146. 0.038 0.038 ↑ 1.0 5 1

Seq Scan on department_users dep_users_4 (cost=0..16.02 rows=5 width=115) (actual time=0.005..0.038 rows=5 loops=1)

  • Filter: ((dep_users_4.user_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Buffers: shared hit=12
147.          

SubPlan (for Hash Join)

148. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on archetype_restrictions res_3 (cost=0..6.36 rows=1 width=0) (never executed)

  • Filter: ((res_3.address)::text = (arch_1.archetype_address)::text)
149. 37.306 37.306 ↑ 1.0 189 1

Seq Scan on archetype_restrictions res_4 (cost=0..5.89 rows=189 width=32) (actual time=37.285..37.306 rows=189 loops=1)

  • Buffers: shared hit=4
150. 9.720 9.720 ↑ 1.0 1 810

Seq Scan on archetype_restrictions res_5 (cost=0..6.36 rows=1 width=65) (actual time=0.007..0.012 rows=1 loops=810)

  • Filter: ((res_5.address)::text = (arch_1.archetype_address)::text)
  • Buffers: shared hit=2,965
151. 0.000 0.000 ↓ 0.0 0 0

Subquery Scan on agreement_parties (cost=60.06..60.1 rows=1 width=0) (never executed)

152. 0.000 0.000 ↓ 0.0 0 0

Unique (cost=60.06..60.09 rows=1 width=387) (never executed)

153. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=60.06..60.06 rows=1 width=387) (never executed)

  • Sort Key: parties._chainid, parties._height, parties._txindex, parties._eventindex, parties._txhash, parties._eventtype, parties._eventname, parties.party, parties.signed_by, parties.signature_timestamp, parties.canceled_by, parties.cancelation_timestamp
154. 0.000 0.000 ↓ 0.0 0 0

Hash Join (cost=6.76..60.05 rows=1 width=387) (never executed)

155. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=5.52..58.8 rows=1 width=498) (never executed)

156. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.23..48.45 rows=1 width=152) (never executed)

157. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.96..40.15 rows=1 width=119) (never executed)

158. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.68..31.8 rows=1 width=86) (never executed)

159. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.55..31.6 rows=1 width=86) (never executed)

160. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.27..23.3 rows=1 width=82) (never executed)

161. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using users_address_key on users users_5 (cost=0.27..8.29 rows=1 width=41) (never executed)

  • Index Cond: (users_5.address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
162. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on organization_users org_users_5 (cost=0..15 rows=1 width=82) (never executed)

  • Filter: ((org_users_5.user_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
163. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using user_roles_pkey on user_roles user_roles_3 (cost=0.27..8.29 rows=1 width=45) (never executed)

  • Index Cond: (user_roles_3.organization_address = (org_users_5.organization_address)::text)
164. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using capabilities_to_roles_pkey on capabilities_to_roles cr_4 (cost=0.14..0.19 rows=1 width=8) (never executed)

  • Index Cond: (cr_4.role_id = user_roles_3.role_id)
165. 0.000 0.000 ↓ 0.0 0 0

Index Scan using organization_accounts_pkey on organization_accounts orgs_3 (cost=0.27..8.29 rows=1 width=74) (never executed)

  • Index Cond: ((orgs_3.organization_address)::text = (org_users_5.organization_address)::text)
166. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using department_users_pkey on department_users dep_users_5 (cost=0.27..8.29 rows=1 width=115) (never executed)

  • Index Cond: ((dep_users_5.organization_address = (org_users_5.organization_address)::text) AND (dep_users_5.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
167. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on agreement_to_party parties (cost=4.29..10.31 rows=2 width=346) (never executed)

168. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on agreement_to_party_pkey (cost=0..4.29 rows=2 width=0) (never executed)

  • Index Cond: ((parties.agreement_address)::text = (agreements.agreement_address)::text)
169. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=1.11..1.11 rows=11 width=36) (never executed)

170. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on capabilities capabilities_3 (cost=0..1.11 rows=11 width=36) (never executed)

171.          

SubPlan (for Hash Join)

172. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_9 (cost=0.14..8.16 rows=1 width=0) (never executed)

  • Index Cond: (((scopes_9.entity_address)::text = (parties.agreement_address)::text) AND ((scopes_9.scope_context)::text = 'AGREEMENT_PARTIES'::text))
  • Filter: (scopes_9.fixed_scope = orgs_3.organization_id)
173. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_10 (cost=0.14..8.9 rows=1 width=64) (never executed)

  • Index Cond: ((scopes_10.scope_context)::text = 'AGREEMENT_PARTIES'::text)
174. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_11 (cost=0.14..8.16 rows=1 width=0) (never executed)

  • Index Cond: (((scopes_11.entity_address)::text = (parties.agreement_address)::text) AND ((scopes_11.scope_context)::text = 'AGREEMENT_PARTIES'::text))
  • Filter: (scopes_11.fixed_scope = dep_users_5.department_id)
175. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_12 (cost=0.14..8.9 rows=1 width=64) (never executed)

  • Index Cond: ((scopes_12.scope_context)::text = 'AGREEMENT_PARTIES'::text)
176. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using entities_address_scopes_pkey on entities_address_scopes scopes_13 (cost=0.14..8.16 rows=1 width=0) (never executed)

  • Index Cond: ((scopes_13.entity_address = (parties.agreement_address)::text) AND (scopes_13.scope_context = 'AGREEMENT_PARTIES'::text))
177. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using entities_address_scopes_pkey on entities_address_scopes scopes_14 (cost=0.14..8.9 rows=1 width=32) (never executed)

  • Index Cond: (scopes_14.scope_context = 'AGREEMENT_PARTIES'::text)
178. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.42..16.46 rows=1 width=0) (never executed)

179. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_15 (cost=0.14..8.16 rows=1 width=32) (never executed)

  • Index Cond: (((scopes_15.entity_address)::text = (parties.agreement_address)::text) AND ((scopes_15.scope_context)::text = 'AGREEMENT_PARTIES'::text))
180. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_departments_pkey on organization_departments od_5 (cost=0.27..8.29 rows=1 width=33) (never executed)

  • Index Cond: (od_5.organization_address = (parties.party)::text)
181. 0.022 59.493 ↓ 162.0 162 1

Subquery Scan on agreement_parties_1 (cost=78.2..78.24 rows=1 width=32) (actual time=59.409..59.493 rows=162 loops=1)

  • Buffers: shared hit=6,434
182. 0.058 59.471 ↓ 162.0 162 1

Unique (cost=78.2..78.23 rows=1 width=387) (actual time=59.405..59.471 rows=162 loops=1)

  • Buffers: shared hit=6,434
183. 0.174 59.413 ↓ 162.0 162 1

Sort (cost=78.2..78.2 rows=1 width=387) (actual time=59.405..59.413 rows=162 loops=1)

  • Sort Key: parties_1._chainid, parties_1._height, parties_1._txindex, parties_1._eventindex, parties_1._txhash, parties_1._eventtype, parties_1._eventname, parties_1.agreement_address, parties_1.party, parties_1.signed_by, parties_1.signature_timestamp, parties_1.canceled_by, parties_1.cancelation_timestamp
  • Sort Method: quicksort Memory: 108kB
  • Buffers: shared hit=6,434
184. 7.842 59.239 ↓ 162.0 162 1

Hash Join (cost=2.48..78.19 rows=1 width=387) (actual time=54.46..59.239 rows=162 loops=1)

  • Buffers: shared hit=6,434
185. 10.248 14.929 ↓ 5,872.5 23,490 1

Nested Loop (cost=1.23..76.93 rows=4 width=498) (actual time=0.062..14.929 rows=23,490 loops=1)

  • Buffers: shared hit=2,869
186. 0.049 0.331 ↓ 145.0 145 1

Nested Loop (cost=1.23..48.45 rows=1 width=152) (actual time=0.054..0.331 rows=145 loops=1)

  • Buffers: shared hit=259
187. 0.014 0.166 ↓ 29.0 29 1

Nested Loop (cost=0.96..40.15 rows=1 width=119) (actual time=0.046..0.166 rows=29 loops=1)

  • Buffers: shared hit=114
188. 0.009 0.094 ↓ 29.0 29 1

Nested Loop (cost=0.68..31.8 rows=1 width=86) (actual time=0.04..0.094 rows=29 loops=1)

  • Buffers: shared hit=27
189. 0.004 0.065 ↓ 5.0 5 1

Nested Loop (cost=0.55..31.6 rows=1 width=86) (actual time=0.028..0.065 rows=5 loops=1)

  • Buffers: shared hit=17
190. 0.001 0.054 ↑ 1.0 1 1

Nested Loop (cost=0.27..23.3 rows=1 width=82) (actual time=0.021..0.054 rows=1 loops=1)

  • Buffers: shared hit=14
191. 0.012 0.012 ↑ 1.0 1 1

Index Only Scan using users_address_key on users users_6 (cost=0.27..8.29 rows=1 width=41) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: (users_6.address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Heap Fetches: 1
  • Buffers: shared hit=3
192. 0.041 0.041 ↑ 1.0 1 1

Seq Scan on organization_users org_users_6 (cost=0..15 rows=1 width=82) (actual time=0.008..0.041 rows=1 loops=1)

  • Filter: ((org_users_6.user_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Buffers: shared hit=11
193. 0.007 0.007 ↓ 5.0 5 1

Index Only Scan using user_roles_pkey on user_roles user_roles_4 (cost=0.27..8.29 rows=1 width=45) (actual time=0.005..0.007 rows=5 loops=1)

  • Index Cond: (user_roles_4.organization_address = (org_users_6.organization_address)::text)
  • Heap Fetches: 5
  • Buffers: shared hit=3
194. 0.020 0.020 ↓ 6.0 6 5

Index Only Scan using capabilities_to_roles_pkey on capabilities_to_roles cr_5 (cost=0.14..0.19 rows=1 width=8) (actual time=0.003..0.004 rows=6 loops=5)

  • Index Cond: (cr_5.role_id = user_roles_4.role_id)
  • Heap Fetches: 29
  • Buffers: shared hit=10
195. 0.058 0.058 ↑ 1.0 1 29

Index Scan using organization_accounts_pkey on organization_accounts orgs_4 (cost=0.27..8.29 rows=1 width=74) (actual time=0.002..0.002 rows=1 loops=29)

  • Index Cond: ((orgs_4.organization_address)::text = (org_users_6.organization_address)::text)
  • Buffers: shared hit=87
196. 0.116 0.116 ↓ 5.0 5 29

Index Only Scan using department_users_pkey on department_users dep_users_6 (cost=0.27..8.29 rows=1 width=115) (actual time=0.003..0.004 rows=5 loops=29)

  • Index Cond: ((dep_users_6.organization_address = (org_users_6.organization_address)::text) AND (dep_users_6.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
  • Heap Fetches: 145
  • Buffers: shared hit=145
197. 4.350 4.350 ↑ 1.0 419 145

Seq Scan on agreement_to_party parties_1 (cost=0..22.19 rows=419 width=346) (actual time=0.001..0.03 rows=419 loops=145)

  • Buffers: shared hit=2,610
198. 0.007 36.468 ↑ 1.0 11 1

Hash (cost=1.11..1.11 rows=11 width=36) (actual time=36.468..36.468 rows=11 loops=1)

  • Buffers: shared hit=1
199. 36.461 36.461 ↑ 1.0 11 1

Seq Scan on capabilities capabilities_4 (cost=0..1.11 rows=11 width=36) (actual time=36.459..36.461 rows=11 loops=1)

  • Buffers: shared hit=1
200.          

SubPlan (for Hash Join)

201. 0.000 0.000 ↓ 0.0 0 810

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_16 (cost=0.14..8.16 rows=1 width=0) (actual time=0..0 rows=0 loops=810)

  • Index Cond: (((scopes_16.entity_address)::text = (parties_1.agreement_address)::text) AND ((scopes_16.scope_context)::text = 'AGREEMENT_PARTIES'::text))
  • Filter: (scopes_16.fixed_scope = orgs_4.organization_id)
  • Buffers: shared hit=1,620
202. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_17 (cost=0.14..8.9 rows=1 width=64) (never executed)

  • Index Cond: ((scopes_17.scope_context)::text = 'AGREEMENT_PARTIES'::text)
203. 0.000 0.000 ↓ 0.0 0 810

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_18 (cost=0.14..8.16 rows=1 width=0) (actual time=0..0 rows=0 loops=810)

  • Index Cond: (((scopes_18.entity_address)::text = (parties_1.agreement_address)::text) AND ((scopes_18.scope_context)::text = 'AGREEMENT_PARTIES'::text))
  • Filter: (scopes_18.fixed_scope = dep_users_6.department_id)
  • Buffers: shared hit=1,620
204. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_19 (cost=0.14..8.9 rows=1 width=64) (never executed)

  • Index Cond: ((scopes_19.scope_context)::text = 'AGREEMENT_PARTIES'::text)
205. 0.000 0.000 ↓ 0.0 0 162

Index Only Scan using entities_address_scopes_pkey on entities_address_scopes scopes_20 (cost=0.14..8.16 rows=1 width=0) (actual time=0..0 rows=0 loops=162)

  • Index Cond: ((scopes_20.entity_address = (parties_1.agreement_address)::text) AND (scopes_20.scope_context = 'AGREEMENT_PARTIES'::text))
  • Buffers: shared hit=324
206. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using entities_address_scopes_pkey on entities_address_scopes scopes_21 (cost=0.14..8.9 rows=1 width=32) (never executed)

  • Index Cond: (scopes_21.scope_context = 'AGREEMENT_PARTIES'::text)
207. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.42..16.46 rows=1 width=0) (never executed)

208. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_22 (cost=0.14..8.16 rows=1 width=32) (never executed)

  • Index Cond: (((scopes_22.entity_address)::text = (parties_1.agreement_address)::text) AND ((scopes_22.scope_context)::text = 'AGREEMENT_PARTIES'::text))
209. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_departments_pkey on organization_departments od_6 (cost=0.27..8.29 rows=1 width=33) (never executed)

  • Index Cond: (od_6.organization_address = (parties_1.party)::text)
210. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.88..121.13 rows=1 width=0) (never executed)

211. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.65..63.1 rows=1 width=155) (never executed)

212. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.51..62.79 rows=1 width=177) (never executed)

213. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.37..62.56 rows=1 width=750) (never executed)

214. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.23..62.05 rows=1 width=398) (never executed)

215. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.96..61.53 rows=1 width=480) (never executed)

216. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.96..53.25 rows=1 width=521) (never executed)

217. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.68..44.9 rows=1 width=480) (never executed)

218. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.55..44.7 rows=1 width=218) (never executed)

219. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.27..44.17 rows=1 width=177) (never executed)

220. 0.000 0.000 ↓ 0.0 0 0

Index Scan using agreements_pkey on agreements ag_2 (cost=0.27..8.29 rows=1 width=164) (never executed)

  • Index Cond: ((ag_2.agreement_address)::text = (agreements.agreement_address)::text)
221. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on activity_instances ai_2 (cost=0..31.35 rows=302 width=95) (never executed)

  • Filter: (ai_2.state = 4)
222. 0.000 0.000 ↓ 0.0 0 0

Index Scan using process_instances_pkey on process_instances pi_2 (cost=0.27..0.53 rows=1 width=82) (never executed)

  • Index Cond: ((pi_2.process_instance_address)::text = (ai_2.process_instance_address)::text)
223. 0.000 0.000 ↓ 0.0 0 0

Index Scan using process_definitions_pkey on process_definitions pd_2 (cost=0.14..0.19 rows=1 width=262) (never executed)

  • Index Cond: ((pd_2.process_definition_address)::text = (pi_2.process_definition_address)::text)
224. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using archetypes_pkey on archetypes ar_2 (cost=0.27..8.29 rows=1 width=41) (never executed)

  • Index Cond: (ar_2.archetype_address = (ag_2.archetype_address)::text)
225. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on agreement_details agd_2 (cost=0..8.28 rows=1 width=41) (never executed)

  • Filter: ((agd_2.address)::text = (agreements.agreement_address)::text)
226. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using archetype_details_pkey on archetype_details ard_2 (cost=0.27..0.51 rows=1 width=41) (never executed)

  • Index Cond: (ard_2.address = (ar_2.archetype_address)::text)
227. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using activity_details_pkey on activity_details actd_2 (cost=0.14..0.5 rows=1 width=1,548) (never executed)

  • Index Cond: (actd_2.activity_id = (ai_2.activity_id)::text)
228. 0.000 0.000 ↓ 0.0 0 0

Index Scan using activity_definitions_pkey on activity_definitions ad_2 (cost=0.14..0.21 rows=1 width=262) (never executed)

  • Index Cond: ((ad_2.activity_id)::text = (ai_2.activity_id)::text)
229. 0.000 0.000 ↓ 0.0 0 0

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_23 (cost=0.14..0.31 rows=1 width=310) (never executed)

  • Index Cond: (((scopes_23.entity_address)::text = (ai_2.process_instance_address)::text) AND ((scopes_23.scope_address)::text = (ai_2.performer)::text) AND ((scopes_23.scope_context)::text = (ai_2.activity_id)::text))
230. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.23..49.7 rows=1 width=180) (never executed)

231. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.96..41.4 rows=1 width=147) (never executed)

232. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.68..33.05 rows=1 width=114) (never executed)

233. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.68..31.8 rows=1 width=86) (never executed)

234. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.55..31.6 rows=1 width=86) (never executed)

235. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.27..23.3 rows=1 width=82) (never executed)

236. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using users_address_key on users users_7 (cost=0.27..8.29 rows=1 width=41) (never executed)

  • Index Cond: (users_7.address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
237. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on organization_users org_users_7 (cost=0..15 rows=1 width=82) (never executed)

  • Filter: ((org_users_7.user_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
238. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using user_roles_pkey on user_roles user_roles_5 (cost=0.27..8.29 rows=1 width=45) (never executed)

  • Index Cond: (user_roles_5.organization_address = (org_users_7.organization_address)::text)
239. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using capabilities_to_roles_pkey on capabilities_to_roles cr_6 (cost=0.14..0.19 rows=1 width=8) (never executed)

  • Index Cond: (cr_6.role_id = user_roles_5.role_id)
240. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on capabilities capabilities_5 (cost=0..1.11 rows=11 width=36) (never executed)

241. 0.000 0.000 ↓ 0.0 0 0

Index Scan using organization_accounts_pkey on organization_accounts orgs_5 (cost=0.27..8.29 rows=1 width=74) (never executed)

  • Index Cond: ((orgs_5.organization_address)::text = (org_users_7.organization_address)::text)
242. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using department_users_pkey on department_users dep_users_7 (cost=0.27..8.29 rows=1 width=115) (never executed)

  • Index Cond: ((dep_users_7.organization_address = (org_users_7.organization_address)::text) AND (dep_users_7.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
243.          

SubPlan (for Nested Loop)

244. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_departments_pkey on organization_departments od_7 (cost=0.27..8.29 rows=1 width=0) (never executed)

  • Index Cond: ((od_7.organization_address = (ai_2.performer)::text) AND (od_7.department_id = scopes_23.fixed_scope))
245. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on organization_departments od_8 (cost=0..14.04 rows=304 width=65) (never executed)

246. 9.249 3,532.765 ↓ 67.0 67 1

Nested Loop (cost=5.92..143.67 rows=1 width=32) (actual time=2,879.587..3,532.765 rows=67 loops=1)

  • Buffers: shared hit=2,855,775
247. 0.079 37.426 ↓ 145.0 145 1

Nested Loop (cost=1.23..49.7 rows=1 width=180) (actual time=36.811..37.426 rows=145 loops=1)

  • Buffers: shared hit=288
248. 0.077 37.115 ↓ 29.0 29 1

Nested Loop (cost=0.96..41.4 rows=1 width=147) (actual time=36.803..37.115 rows=29 loops=1)

  • Buffers: shared hit=143
249. 0.044 37.009 ↓ 29.0 29 1

Nested Loop (cost=0.96..40.15 rows=1 width=119) (actual time=36.795..37.009 rows=29 loops=1)

  • Buffers: shared hit=114
250. 0.019 36.878 ↓ 29.0 29 1

Nested Loop (cost=0.68..31.8 rows=1 width=86) (actual time=36.789..36.878 rows=29 loops=1)

  • Buffers: shared hit=27
251. 0.006 36.824 ↓ 5.0 5 1

Nested Loop (cost=0.55..31.6 rows=1 width=86) (actual time=36.784..36.824 rows=5 loops=1)

  • Buffers: shared hit=17
252. 0.003 36.794 ↑ 1.0 1 1

Nested Loop (cost=0.27..23.3 rows=1 width=82) (actual time=36.761..36.794 rows=1 loops=1)

  • Buffers: shared hit=14
253. 0.010 0.010 ↑ 1.0 1 1

Index Only Scan using users_address_key on users users_8 (cost=0.27..8.29 rows=1 width=41) (actual time=0.009..0.01 rows=1 loops=1)

  • Index Cond: (users_8.address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Heap Fetches: 1
  • Buffers: shared hit=3
254. 36.781 36.781 ↑ 1.0 1 1

Seq Scan on organization_users org_users_8 (cost=0..15 rows=1 width=82) (actual time=36.749..36.781 rows=1 loops=1)

  • Filter: ((org_users_8.user_address)::text = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text)
  • Buffers: shared hit=11
255. 0.024 0.024 ↓ 5.0 5 1

Index Only Scan using user_roles_pkey on user_roles user_roles_6 (cost=0.27..8.29 rows=1 width=45) (actual time=0.019..0.024 rows=5 loops=1)

  • Index Cond: (user_roles_6.organization_address = (org_users_8.organization_address)::text)
  • Heap Fetches: 5
  • Buffers: shared hit=3
256. 0.035 0.035 ↓ 6.0 6 5

Index Only Scan using capabilities_to_roles_pkey on capabilities_to_roles cr_7 (cost=0.14..0.19 rows=1 width=8) (actual time=0.002..0.007 rows=6 loops=5)

  • Index Cond: (cr_7.role_id = user_roles_6.role_id)
  • Heap Fetches: 29
  • Buffers: shared hit=10
257. 0.087 0.087 ↑ 1.0 1 29

Index Scan using organization_accounts_pkey on organization_accounts orgs_6 (cost=0.27..8.29 rows=1 width=74) (actual time=0.003..0.003 rows=1 loops=29)

  • Index Cond: ((orgs_6.organization_address)::text = (org_users_8.organization_address)::text)
  • Buffers: shared hit=87
258. 0.029 0.029 ↑ 1.8 6 29

Seq Scan on capabilities capabilities_6 (cost=0..1.11 rows=11 width=36) (actual time=0.001..0.001 rows=6 loops=29)

  • Buffers: shared hit=29
259. 0.232 0.232 ↓ 5.0 5 29

Index Only Scan using department_users_pkey on department_users dep_users_8 (cost=0.27..8.29 rows=1 width=115) (actual time=0.005..0.008 rows=5 loops=29)

  • Index Cond: ((dep_users_8.organization_address = (org_users_8.organization_address)::text) AND (dep_users_8.user_address = 'AA61700514F1C843B73C886F62A115BB574B4B2A'::text))
  • Heap Fetches: 145
  • Buffers: shared hit=145
260. 7.250 3,486.090 ↓ 302.0 302 145

Nested Loop (cost=4.69..85.64 rows=1 width=196) (actual time=0.026..24.042 rows=302 loops=145)

  • Buffers: shared hit=2,855,487
261. 44.515 3,435.050 ↓ 302.0 302 145

Nested Loop (cost=4.54..85.33 rows=1 width=218) (actual time=0.025..23.69 rows=302 loops=145)

  • Buffers: shared hit=2,767,907
262. 6.525 3,346.745 ↓ 302.0 302 145

Nested Loop (cost=4.41..85.1 rows=1 width=791) (actual time=0.023..23.081 rows=302 loops=145)

  • Buffers: shared hit=2,680,182
263. 8.265 3,252.640 ↓ 302.0 302 145

Nested Loop (cost=4.13..84.66 rows=1 width=791) (actual time=0.021..22.432 rows=302 loops=145)

  • Buffers: shared hit=2,548,812
264. 14.790 3,156.795 ↓ 302.0 302 145

Nested Loop (cost=3.86..84.05 rows=1 width=873) (actual time=0.018..21.771 rows=302 loops=145)

  • Buffers: shared hit=2,417,442
265. 1,540.190 3,054.425 ↓ 302.0 302 145

Nested Loop (cost=3.59..83.53 rows=1 width=832) (actual time=0.016..21.065 rows=302 loops=145)

  • Buffers: shared hit=2,286,072
266. 0.000 419.485 ↓ 302.0 302 145

Nested Loop (cost=3.59..38.03 rows=1 width=750) (actual time=0.012..2.893 rows=302 loops=145)

  • Buffers: shared hit=578,262
267. 40.406 53.795 ↓ 330.2 1,321 145

Hash Join (cost=3.32..35.87 rows=4 width=709) (actual time=0.002..0.371 rows=1,321 loops=145)

  • Buffers: shared hit=3,627
268. 13.340 13.340 ↑ 1.0 302 145

Seq Scan on activity_instances ai_3 (cost=0..31.35 rows=302 width=95) (actual time=0.001..0.092 rows=302 loops=145)

  • Filter: (ai_3.state = 4)
  • Buffers: shared hit=3,625
269. 0.008 0.049 ↓ 41.0 41 1

Hash (cost=3.3..3.3 rows=1 width=614) (actual time=0.049..0.049 rows=41 loops=1)

  • Buffers: shared hit=2
270. 0.020 0.041 ↓ 41.0 41 1

Hash Join (cost=1.57..3.3 rows=1 width=614) (actual time=0.024..0.041 rows=41 loops=1)

  • Buffers: shared hit=2
271. 0.007 0.007 ↑ 1.0 41 1

Seq Scan on activity_details actd_3 (cost=0..1.41 rows=41 width=1,548) (actual time=0.005..0.007 rows=41 loops=1)

  • Buffers: shared hit=1
272. 0.008 0.014 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=262) (actual time=0.014..0.014 rows=23 loops=1)

  • Buffers: shared hit=1
273. 0.006 0.006 ↑ 1.0 23 1

Seq Scan on process_definitions pd_3 (cost=0..1.23 rows=23 width=262) (actual time=0.003..0.006 rows=23 loops=1)

  • Buffers: shared hit=1
274. 383.090 383.090 ↑ 1.0 1 191,545

Index Scan using process_instances_pkey on process_instances pi_3 (cost=0.27..0.53 rows=1 width=82) (actual time=0.001..0.002 rows=1 loops=191,545)

  • Index Cond: ((pi_3.process_instance_address)::text = (ai_3.process_instance_address)::text)
  • Buffers: shared hit=574,635
275. 1,094.750 1,094.750 ↑ 1.0 260 43,790

Seq Scan on agreements ag_3 (cost=0..41.6 rows=260 width=164) (actual time=0..0.025 rows=260 loops=43,790)

  • Buffers: shared hit=1,707,810
276. 87.580 87.580 ↑ 1.0 1 43,790

Index Only Scan using archetype_details_pkey on archetype_details ard_3 (cost=0.27..0.52 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=43,790)

  • Index Cond: (ard_3.address = (ag_3.archetype_address)::text)
  • Heap Fetches: 43,790
  • Buffers: shared hit=131,370
277. 87.580 87.580 ↑ 1.0 1 43,790

Index Only Scan using archetypes_pkey on archetypes ar_3 (cost=0.27..0.59 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=43,790)

  • Index Cond: (ar_3.archetype_address = (ard_3.address)::text)
  • Heap Fetches: 43,790
  • Buffers: shared hit=131,370
278. 87.580 87.580 ↑ 1.0 1 43,790

Index Only Scan using agreement_details_pkey on agreement_details agd_3 (cost=0.27..0.44 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=43,790)

  • Index Cond: (agd_3.address = (ag_3.agreement_address)::text)
  • Heap Fetches: 43,790
  • Buffers: shared hit=131,370
279. 43.790 43.790 ↓ 2.0 2 43,790

Index Scan using activity_definitions_pkey on activity_definitions ad_3 (cost=0.14..0.21 rows=1 width=262) (actual time=0.001..0.001 rows=2 loops=43,790)

  • Index Cond: ((ad_3.activity_id)::text = (ai_3.activity_id)::text)
  • Buffers: shared hit=87,725
280. 43.790 43.790 ↓ 0.0 0 43,790

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_24 (cost=0.14..0.31 rows=1 width=310) (actual time=0.001..0.001 rows=0 loops=43,790)

  • Index Cond: (((scopes_24.entity_address)::text = (ai_3.process_instance_address)::text) AND ((scopes_24.scope_address)::text = (ai_3.performer)::text) AND ((scopes_24.scope_context)::text = (ai_3.activity_id)::text))
  • Buffers: shared hit=87,580
281.          

SubPlan (for Nested Loop)

282. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_departments_pkey on organization_departments od_9 (cost=0.27..8.29 rows=1 width=0) (never executed)

  • Index Cond: ((od_9.organization_address = (ai_3.performer)::text) AND (od_9.department_id = scopes_24.fixed_scope))
283. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on organization_departments od_10 (cost=0..14.04 rows=304 width=65) (never executed)

284. 0.162 0.162 ↑ 1.0 1 162

Index Scan using agreement_details_pkey on agreement_details agreement_details (cost=0.27..0.47 rows=1 width=104) (actual time=0.001..0.001 rows=1 loops=162)

  • Index Cond: ((agreement_details.address)::text = (agreements.agreement_address)::text)
  • Buffers: shared hit=486
285.          

SubPlan (for Group)

286. 0.324 491.184 ↑ 1.0 1 162

Aggregate (cost=4,101.64..4,101.65 rows=1 width=32) (actual time=3.032..3.032 rows=1 loops=162)

  • Buffers: shared hit=12,358
287. 113.016 490.860 ↑ 1.0 1 162

Nested Loop (cost=82.81..4,101.63 rows=1 width=41) (actual time=2.288..3.03 rows=1 loops=162)

  • Buffers: shared hit=12,358
288. 0.095 71.442 ↑ 1.0 1 162

Nested Loop (cost=4.69..62.45 rows=1 width=155) (actual time=0.211..0.441 rows=1 loops=162)

  • Buffers: shared hit=11,168
289. 0.257 71.118 ↑ 1.0 1 162

Nested Loop (cost=4.54..62.13 rows=1 width=177) (actual time=0.209..0.439 rows=1 loops=162)

  • Buffers: shared hit=10,710
290. 0.190 70.632 ↑ 1.0 1 162

Nested Loop (cost=4.41..61.91 rows=1 width=750) (actual time=0.207..0.436 rows=1 loops=162)

  • Buffers: shared hit=10,252
291. 0.509 69.984 ↑ 1.0 1 162

Nested Loop (cost=4.13..61.39 rows=1 width=832) (actual time=0.204..0.432 rows=1 loops=162)

  • Buffers: shared hit=9,565
292. 0.028 65.124 ↑ 1.0 1 162

Nested Loop (cost=4.13..53.11 rows=1 width=873) (actual time=0.195..0.402 rows=1 loops=162)

  • Buffers: shared hit=8,420
293. 0.138 64.638 ↑ 1.0 1 162

Nested Loop (cost=3.86..44.76 rows=1 width=832) (actual time=0.193..0.399 rows=1 loops=162)

  • Buffers: shared hit=7,733
294. 17.172 62.370 ↓ 7.0 7 162

Nested Loop (cost=3.59..44.22 rows=1 width=791) (actual time=0.182..0.385 rows=7 loops=162)

  • Buffers: shared hit=4,538
295. 0.486 0.486 ↑ 1.0 1 162

Index Scan using agreements_pkey on agreements ag_1 (cost=0.27..8.29 rows=1 width=164) (actual time=0.002..0.003 rows=1 loops=162)

  • Index Cond: ((ag_1.agreement_address)::text = (agreements.agreement_address)::text)
  • Buffers: shared hit=486
296. 34.454 44.712 ↓ 330.2 1,321 162

Hash Join (cost=3.32..35.87 rows=4 width=709) (actual time=0.002..0.276 rows=1,321 loops=162)

  • Buffers: shared hit=4,052
297. 10.206 10.206 ↑ 1.0 302 162

Seq Scan on activity_instances ai_1 (cost=0..31.35 rows=302 width=95) (actual time=0.001..0.063 rows=302 loops=162)

  • Filter: (ai_1.state = 4)
  • Buffers: shared hit=4,050
298. 0.008 0.052 ↓ 41.0 41 1

Hash (cost=3.3..3.3 rows=1 width=614) (actual time=0.052..0.052 rows=41 loops=1)

  • Buffers: shared hit=2
299. 0.020 0.044 ↓ 41.0 41 1

Hash Join (cost=1.57..3.3 rows=1 width=614) (actual time=0.027..0.044 rows=41 loops=1)

  • Buffers: shared hit=2
300. 0.005 0.005 ↑ 1.0 41 1

Seq Scan on activity_details actd_1 (cost=0..1.41 rows=41 width=1,548) (actual time=0.003..0.005 rows=41 loops=1)

  • Buffers: shared hit=1
301. 0.013 0.019 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=262) (actual time=0.019..0.019 rows=23 loops=1)

  • Buffers: shared hit=1
302. 0.006 0.006 ↑ 1.0 23 1

Seq Scan on process_definitions pd_1 (cost=0..1.23 rows=23 width=262) (actual time=0.003..0.006 rows=23 loops=1)

  • Buffers: shared hit=1
303. 2.130 2.130 ↑ 1.0 1 1,065

Index Scan using process_instances_pkey on process_instances pi_1 (cost=0.27..0.53 rows=1 width=82) (actual time=0.001..0.002 rows=1 loops=1,065)

  • Index Cond: ((pi_1.process_instance_address)::text = (ai_1.process_instance_address)::text)
  • Buffers: shared hit=3,195
304. 0.458 0.458 ↑ 1.0 1 229

Index Only Scan using archetypes_pkey on archetypes ar_1 (cost=0.27..8.29 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=229)

  • Index Cond: (ar_1.archetype_address = (ag_1.archetype_address)::text)
  • Heap Fetches: 229
  • Buffers: shared hit=687
305. 4.351 4.351 ↑ 1.0 1 229

Seq Scan on agreement_details agd_1 (cost=0..8.28 rows=1 width=41) (actual time=0.008..0.019 rows=1 loops=229)

  • Filter: ((agd_1.address)::text = (agreements.agreement_address)::text)
  • Buffers: shared hit=1,145
306. 0.458 0.458 ↑ 1.0 1 229

Index Only Scan using archetype_details_pkey on archetype_details ard_1 (cost=0.27..0.51 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=229)

  • Index Cond: (ard_1.address = (ar_1.archetype_address)::text)
  • Heap Fetches: 229
  • Buffers: shared hit=687
307. 0.229 0.229 ↓ 2.0 2 229

Index Scan using activity_definitions_pkey on activity_definitions ad_1 (cost=0.14..0.21 rows=1 width=262) (actual time=0.001..0.001 rows=2 loops=229)

  • Index Cond: ((ad_1.activity_id)::text = (ai_1.activity_id)::text)
  • Buffers: shared hit=458
308. 0.229 0.229 ↓ 0.0 0 229

Index Scan using entities_address_scopes_pkey on entities_address_scopes scopes_8 (cost=0.14..0.31 rows=1 width=310) (actual time=0.001..0.001 rows=0 loops=229)

  • Index Cond: (((scopes_8.entity_address)::text = (ai_1.process_instance_address)::text) AND ((scopes_8.scope_address)::text = (ai_1.performer)::text) AND ((scopes_8.scope_context)::text = (ai_1.activity_id)::text))
  • Buffers: shared hit=458
309. 225.083 306.402 ↓ 9.3 4,390 229

Hash Join (cost=78.12..99.1 rows=473 width=180) (actual time=0.005..1.338 rows=4,390 loops=229)

  • Buffers: shared hit=1,190
310. 74.634 80.608 ↓ 8.6 2,973 229

Hash Join (cost=2.74..15.95 rows=346 width=73) (actual time=0.002..0.352 rows=2,973 loops=229)

  • Buffers: shared hit=1,147
311. 5.954 5.954 ↑ 1.0 346 229

Seq Scan on user_roles user_roles_2 (cost=0..8.46 rows=346 width=45) (actual time=0.001..0.026 rows=346 loops=229)

  • Buffers: shared hit=1,145
312. 0.004 0.020 ↑ 1.0 19 1

Hash (cost=2.5..2.5 rows=19 width=36) (actual time=0.02..0.02 rows=19 loops=1)

  • Buffers: shared hit=2
313. 0.007 0.016 ↑ 1.0 19 1

Hash Join (cost=1.25..2.5 rows=19 width=36) (actual time=0.012..0.016 rows=19 loops=1)

  • Buffers: shared hit=2
314. 0.003 0.003 ↑ 1.0 19 1

Seq Scan on capabilities_to_roles cr_3 (cost=0..1.19 rows=19 width=8) (actual time=0.002..0.003 rows=19 loops=1)

  • Buffers: shared hit=1
315. 0.003 0.006 ↑ 1.0 11 1

Hash (cost=1.11..1.11 rows=11 width=36) (actual time=0.006..0.006 rows=11 loops=1)

  • Buffers: shared hit=1
316. 0.003 0.003 ↑ 1.0 11 1

Seq Scan on capabilities capabilities_2 (cost=0..1.11 rows=11 width=36) (actual time=0.003..0.003 rows=11 loops=1)

  • Buffers: shared hit=1
317. 0.078 0.711 ↓ 1.1 354 1

Hash (cost=71.38..71.38 rows=320 width=148) (actual time=0.711..0.711 rows=354 loops=1)

  • Buffers: shared hit=43
318. 0.090 0.633 ↓ 1.1 354 1

Hash Join (cost=52.88..71.38 rows=320 width=148) (actual time=0.385..0.633 rows=354 loops=1)

  • Buffers: shared hit=43
319. 0.139 0.457 ↓ 1.1 354 1

Hash Join (cost=36.69..54.35 rows=320 width=115) (actual time=0.295..0.457 rows=354 loops=1)

  • Buffers: shared hit=33
320. 0.032 0.032 ↑ 1.0 322 1

Seq Scan on department_users dep_users_2 (cost=0..15.22 rows=322 width=115) (actual time=0.003..0.032 rows=322 loops=1)

  • Buffers: shared hit=12
321. 0.078 0.286 ↓ 1.0 330 1

Hash (cost=31.89..31.89 rows=320 width=82) (actual time=0.286..0.286 rows=330 loops=1)

  • Buffers: shared hit=21
322. 0.094 0.208 ↓ 1.0 330 1

Hash Join (cost=16.84..31.89 rows=320 width=82) (actual time=0.089..0.208 rows=330 loops=1)

  • Buffers: shared hit=21
323. 0.031 0.031 ↑ 1.0 320 1

Seq Scan on organization_users org_users_2 (cost=0..14.2 rows=320 width=82) (actual time=0.002..0.031 rows=320 loops=1)

  • Buffers: shared hit=11
324. 0.050 0.083 ↑ 1.0 304 1

Hash (cost=13.04..13.04 rows=304 width=41) (actual time=0.083..0.083 rows=304 loops=1)

  • Buffers: shared hit=10
325. 0.033 0.033 ↑ 1.0 304 1

Seq Scan on users users_2 (cost=0..13.04 rows=304 width=41) (actual time=0.004..0.033 rows=304 loops=1)

  • Buffers: shared hit=10
326. 0.049 0.086 ↑ 1.0 275 1

Hash (cost=12.75..12.75 rows=275 width=74) (actual time=0.086..0.086 rows=275 loops=1)

  • Buffers: shared hit=10
327. 0.037 0.037 ↑ 1.0 275 1

Seq Scan on organization_accounts orgs_2 (cost=0..12.75 rows=275 width=74) (actual time=0.003..0.037 rows=275 loops=1)

  • Buffers: shared hit=10
328.          

SubPlan (for Nested Loop)

329. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using organization_departments_pkey on organization_departments od_3 (cost=0.27..8.29 rows=1 width=0) (never executed)

  • Index Cond: ((od_3.organization_address = (ai_1.performer)::text) AND (od_3.department_id = scopes_8.fixed_scope))
330. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on organization_departments od_4 (cost=0..14.04 rows=304 width=65) (never executed)

331. 0.000 3,504.060 ↓ 0.0 0 162

Limit (cost=0..0.09 rows=1 width=32) (actual time=21.63..21.63 rows=0 loops=162)

  • Buffers: shared hit=2,855,790
332. 3,504.060 3,504.060 ↓ 0.0 0 162

CTE Scan on tasks tasks_1 (cost=0..0.09 rows=1 width=32) (actual time=21.63..21.63 rows=0 loops=162)

  • Filter: ((tasks_1.agreement_address)::text = (agreements.agreement_address)::text)
  • Buffers: shared hit=2,855,790
Planning time : 32.588 ms
Execution time : 24,781.749 ms