explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dAhR

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 146.400 ↑ 1.0 100 1

Limit (cost=5,705.80..5,706.05 rows=100 width=858) (actual time=146.387..146.400 rows=100 loops=1)

2.          

Initplan (for Limit)

3. 0.000 0.208 ↓ 0.0 0 1

Nested Loop (cost=1.27..14.50 rows=1 width=0) (actual time=0.208..0.208 rows=0 loops=1)

4. 0.001 0.208 ↓ 0.0 0 1

Nested Loop (cost=1.13..14.34 rows=1 width=16) (actual time=0.208..0.208 rows=0 loops=1)

  • Join Filter: (persons_func_2.func_id = role_1.role_id)
5. 0.023 0.207 ↓ 0.0 0 1

Nested Loop (cost=0.98..14.16 rows=1 width=32) (actual time=0.207..0.207 rows=0 loops=1)

6. 0.007 0.098 ↓ 1.2 43 1

Nested Loop (cost=0.84..7.79 rows=37 width=40) (actual time=0.068..0.098 rows=43 loops=1)

7. 0.003 0.031 ↓ 1.7 5 1

Nested Loop (cost=0.56..5.21 rows=3 width=24) (actual time=0.029..0.031 rows=5 loops=1)

8. 0.013 0.013 ↑ 1.0 1 1

Index Only Scan using persons_func_pk on persons_func persons_func_2 (cost=0.28..3.30 rows=1 width=8) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: (person_id = 239,349)
  • Heap Fetches: 1
9. 0.015 0.015 ↑ 1.0 5 1

Index Only Scan using role_func_pk on role_func role_func_1 (cost=0.28..1.86 rows=5 width=16) (actual time=0.014..0.015 rows=5 loops=1)

  • Index Cond: (role_id = persons_func_2.func_id)
  • Heap Fetches: 0
10. 0.060 0.060 ↑ 2.0 9 5

Index Only Scan using org_func_perms_pk on org_func_perms (cost=0.28..0.68 rows=18 width=16) (actual time=0.011..0.012 rows=9 loops=5)

  • Index Cond: (org_func_id = role_func_1.org_func_id)
  • Heap Fetches: 0
11. 0.086 0.086 ↓ 0.0 0 43

Index Scan using perms_pk on perms (cost=0.15..0.17 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=43)

  • Index Cond: (perm_id = org_func_perms.perm_id)
  • Filter: ((name)::text = 'ability.act.SupportUser'::text)
  • Rows Removed by Filter: 1
12. 0.000 0.000 ↓ 0.0 0

Index Only Scan using role_pk on role role_1 (cost=0.14..0.17 rows=1 width=8) (never executed)

  • Index Cond: (role_id = role_func_1.role_id)
  • Heap Fetches: 0
13. 0.000 0.000 ↓ 0.0 0

Index Only Scan using org_func_pk on org_func org_func_1 (cost=0.14..0.17 rows=1 width=8) (never executed)

  • Index Cond: (org_func_id = role_func_1.org_func_id)
  • Heap Fetches: 0
14. 0.001 0.089 ↓ 0.0 0 1

Nested Loop (cost=0.84..6.00 rows=1 width=0) (actual time=0.089..0.089 rows=0 loops=1)

  • Join Filter: (persons_func_5.func_id = role_4.role_id)
15. 0.004 0.088 ↓ 0.0 0 1

Nested Loop (cost=0.70..5.82 rows=1 width=16) (actual time=0.088..0.088 rows=0 loops=1)

16. 0.003 0.059 ↓ 1.7 5 1

Nested Loop (cost=0.56..5.21 rows=3 width=24) (actual time=0.057..0.059 rows=5 loops=1)

17. 0.016 0.016 ↑ 1.0 1 1

Index Only Scan using persons_func_pk on persons_func persons_func_5 (cost=0.28..3.30 rows=1 width=8) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: (person_id = 239,349)
  • Heap Fetches: 1
18. 0.040 0.040 ↑ 1.0 5 1

Index Only Scan using role_func_pk on role_func role_func_4 (cost=0.28..1.86 rows=5 width=16) (actual time=0.039..0.040 rows=5 loops=1)

  • Index Cond: (role_id = persons_func_5.func_id)
  • Heap Fetches: 0
19. 0.025 0.025 ↓ 0.0 0 5

Index Scan using org_func_pk on org_func org_func_4 (cost=0.14..0.20 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=5)

  • Index Cond: (org_func_id = role_func_4.org_func_id)
  • Filter: ((name)::text = 'COMPANY'::text)
  • Rows Removed by Filter: 1
20. 0.000 0.000 ↓ 0.0 0

Index Only Scan using role_pk on role role_4 (cost=0.14..0.17 rows=1 width=8) (never executed)

  • Index Cond: (role_id = role_func_4.role_id)
  • Heap Fetches: 0
21. 6.781 146.390 ↑ 29.0 100 1

Sort (cost=5,685.30..5,692.54 rows=2,899 width=858) (actual time=146.385..146.390 rows=100 loops=1)

  • Sort Key: persons.first_name, persons.last_name, persons.person_id
  • Sort Method: top-N heapsort Memory: 182kB
22. 18.163 139.609 ↓ 2.6 7,503 1

GroupAggregate (cost=5,386.06..5,574.50 rows=2,899 width=858) (actual time=120.728..139.609 rows=7,503 loops=1)

  • Group Key: persons.person_id, recipients.org_id, recipients.org_uuid, recipients.updated_by_uuid, recipients.is_externally_owned, recipients.recipient_cat, recipients.target_name, recipients.sync_external_key, recipients.uuid, languages.descrion, tz.name, web_creds.name, phone_creds.name, sites.site_id, person_sups.sup_id
23. 9.437 121.446 ↓ 2.8 8,002 1

Sort (cost=5,386.06..5,393.31 rows=2,899 width=986) (actual time=120.664..121.446 rows=8,002 loops=1)

  • Sort Key: persons.person_id, recipients.org_uuid, recipients.updated_by_uuid, recipients.is_externally_owned, recipients.recipient_cat, recipients.target_name, recipients.sync_external_key, recipients.uuid, languages.descrion, tz.name, web_creds.name, phone_creds.name, sites.site_id, person_sups.sup_id
  • Sort Method: quicksort Memory: 4,426kB
24. 2.339 112.009 ↓ 2.8 8,002 1

Hash Left Join (cost=4,922.81..5,219.35 rows=2,899 width=986) (actual time=104.532..112.009 rows=8,002 loops=1)

  • Hash Cond: (all_persons_func.func_id = all_person_roles.role_id)
25. 4.246 109.563 ↓ 2.8 8,002 1

Hash Right Join (cost=4,914.59..5,203.19 rows=2,899 width=833) (actual time=104.412..109.563 rows=8,002 loops=1)

  • Hash Cond: (all_persons_func.person_id = persons.person_id)
26. 0.942 0.942 ↓ 1.0 7,564 1

Seq Scan on persons_func all_persons_func (cost=0.00..250.85 rows=7,385 width=16) (actual time=0.010..0.942 rows=7,564 loops=1)

27. 5.418 104.375 ↓ 2.6 7,672 1

Hash (cost=4,878.35..4,878.35 rows=2,899 width=825) (actual time=104.374..104.375 rows=7,672 loops=1)

  • Buckets: 8,192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 2,511kB
28. 1.671 98.957 ↓ 2.6 7,672 1

Hash Anti Join (cost=4,544.08..4,878.35 rows=2,899 width=825) (actual time=90.466..98.957 rows=7,672 loops=1)

  • Hash Cond: (persons.person_id = persons_func_1.person_id)
29. 2.404 97.145 ↓ 2.6 7,672 1

Hash Left Join (cost=4,374.96..4,671.84 rows=3,004 width=825) (actual time=90.318..97.145 rows=7,672 loops=1)

  • Hash Cond: (persons.site_id = sites.site_id)
30. 3.547 94.422 ↓ 2.6 7,672 1

Hash Right Join (cost=4,353.91..4,642.88 rows=3,004 width=740) (actual time=89.983..94.422 rows=7,672 loops=1)

  • Hash Cond: (filtered_persons_func.person_id = persons.person_id)
31. 0.928 0.928 ↓ 1.0 7,564 1

Seq Scan on persons_func filtered_persons_func (cost=0.00..250.85 rows=7,385 width=16) (actual time=0.008..0.928 rows=7,564 loops=1)

32. 4.225 89.947 ↓ 2.5 7,552 1

Hash (cost=4,316.36..4,316.36 rows=3,004 width=740) (actual time=89.947..89.947 rows=7,552 loops=1)

  • Buckets: 8,192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 1,787kB
33. 3.586 85.722 ↓ 2.5 7,552 1

Hash Right Join (cost=4,027.40..4,316.36 rows=3,004 width=740) (actual time=81.168..85.722 rows=7,552 loops=1)

  • Hash Cond: (persons_func.person_id = persons.person_id)
34. 1.010 1.010 ↓ 1.0 7,564 1

Seq Scan on persons_func (cost=0.00..250.85 rows=7,385 width=16) (actual time=0.014..1.010 rows=7,564 loops=1)

35. 5.186 81.126 ↓ 2.5 7,503 1

Hash (cost=3,989.85..3,989.85 rows=3,004 width=740) (actual time=81.126..81.126 rows=7,503 loops=1)

  • Buckets: 8,192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 1,775kB
36. 7.853 75.940 ↓ 2.5 7,503 1

Hash Left Join (cost=1,416.08..3,989.85 rows=3,004 width=740) (actual time=41.723..75.940 rows=7,503 loops=1)

  • Hash Cond: (persons.person_id = person_sups.person_id)
  • Filter: ((((alternatives: SubPlan 1 or hashed SubPlan 2) OR (persons.person_id = 239,349) OR (person_sups.sup_id IS NOT NULL) OR $15) AND (NOT (alternatives: SubPlan 4 or hashed SubPlan 5))) OR $26)
  • Rows Removed by Filter: 6
37. 2.346 61.329 ↓ 1.9 7,509 1

Hash Left Join (cost=1,410.18..3,973.44 rows=4,006 width=732) (actual time=32.608..61.329 rows=7,509 loops=1)

  • Hash Cond: (persons.person_id = phone_creds.phone_cred_id)
38. 3.051 58.940 ↓ 1.9 7,509 1

Hash Left Join (cost=1,406.43..3,959.17 rows=4,006 width=726) (actual time=32.547..58.940 rows=7,509 loops=1)

  • Hash Cond: (persons.person_id = web_creds.web_cred_id)
39. 2.259 51.528 ↓ 1.9 7,509 1

Hash Left Join (cost=962.88..3,505.11 rows=4,006 width=718) (actual time=28.136..51.528 rows=7,509 loops=1)

  • Hash Cond: (org_tz.tz_id = tz.tz_id)
40. 2.254 49.072 ↓ 1.9 7,509 1

Hash Left Join (cost=946.60..3,478.21 rows=4,006 width=711) (actual time=27.925..49.072 rows=7,509 loops=1)

  • Hash Cond: (persons.org_tz_id = org_tz.org_tz_id)
41. 2.158 46.581 ↓ 1.9 7,509 1

Hash Left Join (cost=924.01..3,445.08 rows=4,006 width=711) (actual time=27.675..46.581 rows=7,509 loops=1)

  • Hash Cond: (org_languages.language_id = languages.language_id)
42. 2.133 44.390 ↓ 1.9 7,509 1

Hash Left Join (cost=922.07..3,431.57 rows=4,006 width=716) (actual time=27.620..44.390 rows=7,509 loops=1)

  • Hash Cond: (persons.org_language_id = org_languages.org_language_id)
43. 9.542 42.241 ↓ 1.9 7,509 1

Hash Join (cost=920.98..3,416.04 rows=4,006 width=716) (actual time=27.570..42.241 rows=7,509 loops=1)

  • Hash Cond: (recipients.recipient_id = persons.person_id)
44. 22.646 22.646 ↑ 1.1 30,020 1

Index Scan using idx_recipients_del_org_id_cat on recipients (cost=0.29..2,410.86 rows=32,186 width=620) (actual time=0.058..22.646 rows=30,020 loops=1)

  • Index Cond: (org_id = 1)
45. 2.757 10.053 ↓ 1.0 7,514 1

Hash (cost=827.14..827.14 rows=7,484 width=104) (actual time=10.053..10.053 rows=7,514 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 1,098kB
46. 6.400 7.296 ↓ 1.0 7,514 1

Bitmap Heap Scan on persons (cost=118.59..827.14 rows=7,484 width=104) (actual time=0.991..7.296 rows=7,514 loops=1)

  • Recheck Cond: (deleted_id = '-1'::integer)
  • Heap Blocks: exact=549
47. 0.896 0.896 ↓ 1.4 10,417 1

Bitmap Index Scan on idx_persons_recorded_name_not_deleted (cost=0.00..116.72 rows=7,484 width=0) (actual time=0.896..0.896 rows=10,417 loops=1)

48. 0.005 0.016 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=16) (actual time=0.016..0.016 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
49. 0.011 0.011 ↑ 1.0 4 1

Seq Scan on org_languages (cost=0.00..1.04 rows=4 width=16) (actual time=0.010..0.011 rows=4 loops=1)

50. 0.016 0.033 ↑ 1.0 42 1

Hash (cost=1.42..1.42 rows=42 width=11) (actual time=0.033..0.033 rows=42 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
51. 0.017 0.017 ↑ 1.0 42 1

Seq Scan on languages (cost=0.00..1.42 rows=42 width=11) (actual time=0.012..0.017 rows=42 loops=1)

52. 0.097 0.237 ↑ 1.0 604 1

Hash (cost=15.04..15.04 rows=604 width=16) (actual time=0.237..0.237 rows=604 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 37kB
53. 0.140 0.140 ↑ 1.0 604 1

Seq Scan on org_tz (cost=0.00..15.04 rows=604 width=16) (actual time=0.011..0.140 rows=604 loops=1)

54. 0.100 0.197 ↑ 1.0 457 1

Hash (cost=10.57..10.57 rows=457 width=23) (actual time=0.197..0.197 rows=457 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 35kB
55. 0.097 0.097 ↑ 1.0 457 1

Seq Scan on tz (cost=0.00..10.57 rows=457 width=23) (actual time=0.012..0.097 rows=457 loops=1)

56. 1.441 4.361 ↓ 1.0 7,514 1

Hash (cost=352.13..352.13 rows=7,313 width=16) (actual time=4.361..4.361 rows=7,514 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 435kB
57. 2.920 2.920 ↓ 1.0 7,514 1

Seq Scan on web_creds (cost=0.00..352.13 rows=7,313 width=16) (actual time=0.011..2.920 rows=7,514 loops=1)

58. 0.017 0.043 ↑ 1.0 78 1

Hash (cost=2.78..2.78 rows=78 width=14) (actual time=0.043..0.043 rows=78 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
59. 0.026 0.026 ↑ 1.0 78 1

Seq Scan on phone_creds (cost=0.00..2.78 rows=78 width=14) (actual time=0.011..0.026 rows=78 loops=1)

60. 0.001 0.031 ↓ 0.0 0 1

Hash (cost=5.86..5.86 rows=3 width=16) (actual time=0.031..0.031 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
61. 0.030 0.030 ↓ 0.0 0 1

Index Scan using idx_person_sups2 on person_sups (cost=0.41..5.86 rows=3 width=16) (actual time=0.030..0.030 rows=0 loops=1)

  • Index Cond: (sup_id = 239,349)
62.          

SubPlan (for Hash Left Join)

63. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.26..8.92 rows=1 width=0) (never executed)

64. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.12..8.76 rows=1 width=16) (never executed)

65. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.99..8.59 rows=1 width=24) (never executed)

  • Join Filter: (src_persons_func.func_id = src_role.role_id)
66. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..8.42 rows=1 width=40) (never executed)

67. 0.000 0.000 ↓ 0.0 0

Index Only Scan using persons_func_pk on persons_func target_persons_func (cost=0.28..3.30 rows=1 width=8) (never executed)

  • Index Cond: (person_id = persons.person_id)
  • Heap Fetches: 0
68. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.56..5.11 rows=1 width=32) (never executed)

69. 0.000 0.000 ↓ 0.0 0

Index Only Scan using persons_func_pk on persons_func src_persons_func (cost=0.28..3.30 rows=1 width=8) (never executed)

  • Index Cond: (person_id = 239,349)
  • Heap Fetches: 0
70. 0.000 0.000 ↓ 0.0 0

Index Only Scan using role_perm_grants_pk on role_perm_grants (cost=0.28..1.80 rows=1 width=24) (never executed)

  • Index Cond: ((src_role_id = src_persons_func.func_id) AND (target_role_id = target_persons_func.func_id))
  • Heap Fetches: 0
71. 0.000 0.000 ↓ 0.0 0

Index Only Scan using role_pk on role src_role (cost=0.14..0.16 rows=1 width=8) (never executed)

  • Index Cond: (role_id = role_perm_grants.src_role_id)
  • Heap Fetches: 0
72. 0.000 0.000 ↓ 0.0 0

Index Scan using role_perms_pk on role_perms (cost=0.13..0.16 rows=1 width=8) (never executed)

  • Index Cond: (role_perm_id = role_perm_grants.role_perm_id)
  • Filter: ((name)::text = ANY ('{""View Person"",""Edit Person"",""Use Person""}'::text[]))
73. 0.000 0.000 ↓ 0.0 0

Index Only Scan using role_pk on role target_role (cost=0.14..0.16 rows=1 width=8) (never executed)

  • Index Cond: (role_id = role_perm_grants.target_role_id)
  • Heap Fetches: 0
74. 1.373 6.569 ↓ 10.1 7,555 1

Hash Join (cost=6.85..68.69 rows=746 width=8) (actual time=0.218..6.569 rows=7,555 loops=1)

  • Hash Cond: (src_persons_func_1.func_id = src_role_1.role_id)
75. 1.311 5.159 ↓ 25.4 7,555 1

Nested Loop (cost=0.99..62.01 rows=298 width=24) (actual time=0.165..5.159 rows=7,555 loops=1)

  • Join Filter: (target_role_1.role_id = target_persons_func_1.func_id)
76. 0.009 0.174 ↓ 2.8 11 1

Nested Loop (cost=0.70..7.97 rows=4 width=32) (actual time=0.137..0.174 rows=11 loops=1)

77. 0.006 0.132 ↓ 2.8 11 1

Nested Loop (cost=0.56..7.32 rows=4 width=24) (actual time=0.113..0.132 rows=11 loops=1)

  • Join Filter: (role_perm_grants_1.role_perm_id = role_perms_1.role_perm_id)
  • Rows Removed by Join Filter: 24
78. 0.006 0.102 ↓ 1.3 12 1

Nested Loop (cost=0.56..5.88 rows=9 width=32) (actual time=0.095..0.102 rows=12 loops=1)

79. 0.059 0.059 ↑ 1.0 1 1

Index Only Scan using persons_func_pk on persons_func src_persons_func_1 (cost=0.28..3.30 rows=1 width=8) (actual time=0.058..0.059 rows=1 loops=1)

  • Index Cond: (person_id = 239,349)
  • Heap Fetches: 1
80. 0.037 0.037 ↑ 2.4 12 1

Index Only Scan using role_perm_grants_pk on role_perm_grants role_perm_grants_1 (cost=0.28..2.28 rows=29 width=24) (actual time=0.034..0.037 rows=12 loops=1)

  • Index Cond: (src_role_id = src_persons_func_1.func_id)
  • Heap Fetches: 0
81. 0.012 0.024 ↑ 1.0 3 12

Materialize (cost=0.00..1.10 rows=3 width=8) (actual time=0.001..0.002 rows=3 loops=12)

82. 0.012 0.012 ↑ 1.0 3 1

Seq Scan on role_perms role_perms_1 (cost=0.00..1.08 rows=3 width=8) (actual time=0.009..0.012 rows=3 loops=1)

  • Filter: ((name)::text = ANY ('{""View Person"",""Edit Person"",""Use Person""}'::text[]))
  • Rows Removed by Filter: 3
83. 0.033 0.033 ↑ 1.0 1 11

Index Only Scan using role_pk on role target_role_1 (cost=0.14..0.16 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=11)

  • Index Cond: (role_id = role_perm_grants_1.target_role_id)
  • Heap Fetches: 0
84. 3.674 3.674 ↓ 1.6 687 11

Index Scan using idx_persons_func2 on persons_func target_persons_func_1 (cost=0.28..8.08 rows=434 width=16) (actual time=0.004..0.334 rows=687 loops=11)

  • Index Cond: (func_id = role_perm_grants_1.target_role_id)
85. 0.015 0.037 ↑ 1.0 99 1

Hash (cost=4.63..4.63 rows=99 width=8) (actual time=0.037..0.037 rows=99 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
86. 0.022 0.022 ↑ 1.0 99 1

Index Only Scan using role_pk on role src_role_1 (cost=0.14..4.63 rows=99 width=8) (actual time=0.013..0.022 rows=99 loops=1)

  • Heap Fetches: 0
87. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..6.00 rows=1 width=0) (never executed)

  • Join Filter: (persons_func_3.func_id = role_2.role_id)
88. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.70..5.82 rows=1 width=16) (never executed)

89. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.56..5.21 rows=3 width=24) (never executed)

90. 0.000 0.000 ↓ 0.0 0

Index Only Scan using persons_func_pk on persons_func persons_func_3 (cost=0.28..3.30 rows=1 width=8) (never executed)

  • Index Cond: (person_id = persons.person_id)
  • Heap Fetches: 0
91. 0.000 0.000 ↓ 0.0 0

Index Only Scan using role_func_pk on role_func role_func_2 (cost=0.28..1.86 rows=5 width=16) (never executed)

  • Index Cond: (role_id = persons_func_3.func_id)
  • Heap Fetches: 0
92. 0.000 0.000 ↓ 0.0 0

Index Scan using org_func_pk on org_func org_func_2 (cost=0.14..0.20 rows=1 width=8) (never executed)

  • Index Cond: (org_func_id = role_func_2.org_func_id)
  • Filter: ((name)::text = 'COMPANY'::text)
93. 0.000 0.000 ↓ 0.0 0

Index Only Scan using role_pk on role role_2 (cost=0.14..0.17 rows=1 width=8) (never executed)

  • Index Cond: (role_id = role_func_2.role_id)
  • Heap Fetches: 0
94. 0.009 0.158 ↑ 186.5 4 1

Hash Join (cost=8.22..158.55 rows=746 width=8) (actual time=0.103..0.158 rows=4 loops=1)

  • Hash Cond: (persons_func_4.func_id = role_3.role_id)
95. 0.003 0.123 ↑ 86.5 4 1

Nested Loop (cost=2.36..151.74 rows=346 width=24) (actual time=0.068..0.123 rows=4 loops=1)

96. 0.006 0.108 ↑ 2.5 4 1

Nested Loop (cost=2.08..21.87 rows=10 width=8) (actual time=0.060..0.108 rows=4 loops=1)

97. 0.020 0.062 ↑ 1.0 4 1

Bitmap Heap Scan on org_func org_func_3 (cost=1.80..6.52 rows=4 width=8) (actual time=0.049..0.062 rows=4 loops=1)

  • Recheck Cond: ((name)::text = 'COMPANY'::text)
  • Heap Blocks: exact=3
98. 0.042 0.042 ↑ 1.0 4 1

Bitmap Index Scan on idx_org_func_name (cost=0.00..1.80 rows=4 width=0) (actual time=0.042..0.042 rows=4 loops=1)

  • Index Cond: ((name)::text = 'COMPANY'::text)
99. 0.040 0.040 ↑ 3.0 1 4

Index Scan using idx_role_func2 on role_func role_func_3 (cost=0.28..3.81 rows=3 width=16) (actual time=0.010..0.010 rows=1 loops=4)

  • Index Cond: (org_func_id = org_func_3.org_func_id)
100. 0.012 0.012 ↑ 434.0 1 4

Index Scan using idx_persons_func2 on persons_func persons_func_4 (cost=0.28..8.65 rows=434 width=16) (actual time=0.003..0.003 rows=1 loops=4)

  • Index Cond: (func_id = role_func_3.role_id)
101. 0.013 0.026 ↑ 1.0 99 1

Hash (cost=4.63..4.63 rows=99 width=8) (actual time=0.026..0.026 rows=99 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
102. 0.013 0.013 ↑ 1.0 99 1

Index Only Scan using role_pk on role role_3 (cost=0.14..4.63 rows=99 width=8) (actual time=0.004..0.013 rows=99 loops=1)

  • Heap Fetches: 0
103. 0.119 0.319 ↓ 1.0 403 1

Hash (cost=16.02..16.02 rows=402 width=93) (actual time=0.319..0.319 rows=403 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 59kB
104. 0.200 0.200 ↓ 1.0 403 1

Seq Scan on sites (cost=0.00..16.02 rows=402 width=93) (actual time=0.012..0.200 rows=403 loops=1)

105. 0.004 0.141 ↑ 373.0 2 1

Hash (cost=159.79..159.79 rows=746 width=8) (actual time=0.141..0.141 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
106. 0.013 0.137 ↑ 373.0 2 1

Hash Join (cost=6.69..159.79 rows=746 width=8) (actual time=0.134..0.137 rows=2 loops=1)

  • Hash Cond: (persons_func_1.func_id = role.role_id)
107. 0.002 0.084 ↑ 173.0 2 1

Nested Loop (cost=0.83..152.99 rows=346 width=24) (actual time=0.082..0.084 rows=2 loops=1)

108. 0.004 0.066 ↑ 2.5 4 1

Nested Loop (cost=0.55..23.12 rows=10 width=8) (actual time=0.050..0.066 rows=4 loops=1)

109. 0.034 0.034 ↑ 1.0 4 1

Index Scan using idx_org_func_name on org_func (cost=0.27..7.76 rows=4 width=8) (actual time=0.030..0.034 rows=4 loops=1)

  • Index Cond: ((name)::text = 'SUPER'::text)
110. 0.028 0.028 ↑ 3.0 1 4

Index Scan using idx_role_func2 on role_func (cost=0.28..3.81 rows=3 width=16) (actual time=0.007..0.007 rows=1 loops=4)

  • Index Cond: (org_func_id = org_func.org_func_id)
111. 0.016 0.016 ↓ 0.0 0 4

Index Scan using idx_persons_func2 on persons_func persons_func_1 (cost=0.28..8.65 rows=434 width=16) (actual time=0.004..0.004 rows=0 loops=4)

  • Index Cond: (func_id = role_func.role_id)
112. 0.018 0.040 ↑ 1.0 99 1

Hash (cost=4.63..4.63 rows=99 width=8) (actual time=0.040..0.040 rows=99 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
113. 0.022 0.022 ↑ 1.0 99 1

Index Only Scan using role_pk on role (cost=0.14..4.63 rows=99 width=8) (actual time=0.014..0.022 rows=99 loops=1)

  • Heap Fetches: 0
114. 0.044 0.107 ↑ 1.0 99 1

Hash (cost=6.99..6.99 rows=99 width=161) (actual time=0.107..0.107 rows=99 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 27kB
115. 0.063 0.063 ↑ 1.0 99 1

Seq Scan on role all_person_roles (cost=0.00..6.99 rows=99 width=161) (actual time=0.017..0.063 rows=99 loops=1)

Planning time : 33.020 ms
Execution time : 148.066 ms