explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vH8W

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 517.701 ↑ 3.0 2 1

Hash Semi Join (cost=154,536,670.49..309,108,574.54 rows=6 width=112) (actual time=228.062..517.701 rows=2 loops=1)

  • Hash Cond: ("*SELECT* 1_1".rolename = "*SELECT* 1".rolename)
2. 0.001 517.617 ↑ 2.2 5 1

Append (cost=154,536,656.86..309,108,560.71 rows=11 width=112) (actual time=227.982..517.617 rows=5 loops=1)

3. 0.002 227.982 ↑ 6.0 1 1

Subquery Scan on *SELECT* 1_1 (cost=154,536,656.86..154,536,656.98 rows=6 width=160) (actual time=227.981..227.982 rows=1 loops=1)

4. 0.001 227.980 ↑ 6.0 1 1

Unique (cost=154,536,656.86..154,536,656.90 rows=6 width=156) (actual time=227.980..227.980 rows=1 loops=1)

5. 0.013 227.979 ↑ 6.0 1 1

Sort (cost=154,536,656.86..154,536,656.87 rows=6 width=156) (actual time=227.979..227.979 rows=1 loops=1)

  • Sort Key: assigned_roles.rolename, ('RoleEx_Assigned '::character(20))
  • Sort Method: quicksort Memory: 25kB
6. 0.006 227.966 ↑ 6.0 1 1

Nested Loop (cost=0.71..154,536,656.78 rows=6 width=156) (actual time=0.050..227.966 rows=1 loops=1)

  • Join Filter: (assigned_roles.rolename = "*SELECT* 1_2".rolename)
  • Rows Removed by Join Filter: 23
7. 0.003 227.916 ↑ 1.5 4 1

Append (cost=0.14..154,536,642.67 rows=6 width=116) (actual time=0.012..227.916 rows=4 loops=1)

8. 0.013 0.013 ↓ 2.0 2 1

Index Only Scan using pk_assigned_roles on assigned_roles (cost=0.14..2.16 rows=1 width=93) (actual time=0.012..0.013 rows=2 loops=1)

  • Index Cond: ((personid = '25980 '::bpchar) AND (personid = '25980 '::bpchar))
  • Heap Fetches: 2
9. 0.000 47.373 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2_2 (cost=1,000.27..35,271.71 rows=1 width=120) (actual time=47.373..47.373 rows=0 loops=1)

10. 0.000 47.373 ↓ 0.0 0 1

Nested Loop Semi Join (cost=1,000.27..35,271.70 rows=1 width=224) (actual time=47.373..47.373 rows=0 loops=1)

11. 2.660 47.409 ↓ 2.0 2 1

Gather (cost=1,000.00..35,269.36 rows=1 width=13) (actual time=0.688..47.409 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
12. 44.749 44.749 ↑ 1.0 1 3 / 3

Parallel Seq Scan on person p (cost=0.00..34,269.26 rows=1 width=13) (actual time=29.207..44.749 rows=1 loops=3)

  • Filter: (personid = '25980 '::bpchar)
  • Rows Removed by Filter: 467408
13. 0.018 0.018 ↓ 0.0 0 2

Index Scan using pk_person_company_rel on person_company_rel pcr (cost=0.28..2.34 rows=1 width=13) (actual time=0.009..0.009 rows=0 loops=2)

  • Index Cond: (personid = '25980 '::bpchar)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts) AND ((personcompanyreltype = 'CBAdm'::bpchar) OR (personcompanyreltype = 'SCAdm'::bpchar) OR (personcompanyreltype = 'BnAdm'::bpchar) OR (personcompanyreltype = 'PRMgr'::bpchar) OR (personcompanyreltype = 'HRGen'::bpchar) OR (personcompanyreltype = 'HRGL'::bpchar) OR (personcompanyreltype = 'BnMgr'::bpchar) OR (personcompanyreltype = 'PRSup'::bpchar) OR (personcompanyreltype = 'HRAdm'::bpchar) OR (personcompanyreltype = 'PyAdm'::bpchar)))
14. 0.001 47.865 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=1,000.14..35,271.58 rows=1 width=120) (actual time=47.864..47.865 rows=0 loops=1)

15. 0.000 47.864 ↓ 0.0 0 1

Nested Loop Semi Join (cost=1,000.14..35,271.57 rows=1 width=224) (actual time=47.864..47.864 rows=0 loops=1)

16. 2.644 47.880 ↓ 2.0 2 1

Gather (cost=1,000.00..35,269.36 rows=1 width=13) (actual time=0.688..47.880 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
17. 45.236 45.236 ↑ 1.0 1 3 / 3

Parallel Seq Scan on person p_1 (cost=0.00..34,269.26 rows=1 width=13) (actual time=29.528..45.236 rows=1 loops=3)

  • Filter: (personid = '25980 '::bpchar)
  • Rows Removed by Filter: 467408
18. 0.014 0.014 ↓ 0.0 0 2

Index Scan using pk_person_location_rel on person_location_rel pl (cost=0.14..2.20 rows=1 width=13) (actual time=0.007..0.007 rows=0 loops=2)

  • Index Cond: (personid = '25980 '::bpchar)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts) AND ((personlocationreltype = 'BA'::bpchar) OR (personlocationreltype = 'BM'::bpchar) OR (personlocationreltype = 'HG'::bpchar) OR (personlocationreltype = 'PM'::bpchar) OR (personlocationreltype = 'PS'::bpchar) OR (personlocationreltype = 'HR'::bpchar) OR (personlocationreltype = 'SC'::bpchar) OR (personlocationreltype = 'CB'::bpchar)))
19. 0.001 0.015 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4 (cost=0.57..4.81 rows=1 width=120) (actual time=0.015..0.015 rows=0 loops=1)

20. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=0.57..4.80 rows=1 width=224) (actual time=0.014..0.014 rows=0 loops=1)

21. 0.014 0.014 ↓ 0.0 0 1

Index Scan using pers_pos_personid_idx on pers_pos p_2 (cost=0.29..2.32 rows=1 width=4) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (personid = '25980 '::bpchar)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
22. 0.000 0.000 ↓ 0.0 0

Index Scan using pos_org_rel_positionid_idx on pos_org_rel por (cost=0.29..2.46 rows=1 width=4) (never executed)

  • Index Cond: (positionid = p_2.positionid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts) AND ((posorgreltype = 'BAdmin'::bpchar) OR (posorgreltype = 'BenMgr'::bpchar) OR (posorgreltype = 'HRGen'::bpchar) OR (posorgreltype = 'HRGL'::bpchar) OR (posorgreltype = 'PRMgr'::bpchar) OR (posorgreltype = 'PRSupr'::bpchar) OR (posorgreltype = 'HRAdmin'::bpchar) OR (posorgreltype = 'SCAdmin'::bpchar) OR (posorgreltype = 'CBAdmin'::bpchar)))
23. 0.000 0.008 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5 (cost=0.14..2.19 rows=1 width=120) (actual time=0.008..0.008 rows=0 loops=1)

24. 0.008 0.008 ↓ 0.0 0 1

Index Scan using pk_person_organization_rel on person_organization_rel p_3 (cost=0.14..2.18 rows=1 width=224) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (personid = '25980 '::bpchar)
  • Filter: ((personorganizationreltype = 'BnAm'::bpchar) OR (personorganizationreltype = 'BnMg'::bpchar) OR (personorganizationreltype = 'HRGn'::bpchar) OR (personorganizationreltype = 'PRMr'::bpchar) OR (personorganizationreltype = 'PRSu'::bpchar) OR (personorganizationreltype = 'HRAm'::bpchar) OR (personorganizationreltype = 'SCAm'::bpchar) OR (personorganizationreltype = 'CBAm'::bpchar))
25. 0.001 132.639 ↓ 2.0 2 1

Subquery Scan on *SELECT* 6 (cost=0.00..154,466,090.22 rows=1 width=120) (actual time=0.778..132.639 rows=2 loops=1)

26. 131.224 132.638 ↓ 2.0 2 1

Seq Scan on person p_4 (cost=0.00..154,466,090.21 rows=1 width=224) (actual time=0.777..132.638 rows=2 loops=1)

  • Filter: ((personid = '25980 '::bpchar) AND ((SubPlan 2) > 1))
  • Rows Removed by Filter: 1402223
27.          

SubPlan (for Seq Scan)

28. 0.086 1.414 ↑ 1.0 1 2

Aggregate (cost=110.11..110.12 rows=1 width=8) (actual time=0.707..0.707 rows=1 loops=2)

29. 0.062 1.328 ↓ 1.1 336 2

Merge Append (cost=55.02..106.39 rows=298 width=65) (actual time=0.163..0.664 rows=336 loops=2)

  • Sort Key: co_1.companyid
30. 0.146 1.014 ↓ 1.2 336 2

Unique (cost=0.42..42.90 rows=284 width=65) (actual time=0.032..0.507 rows=336 loops=2)

31. 0.322 0.868 ↓ 2.0 672 2

Nested Loop (cost=0.42..42.05 rows=340 width=65) (actual time=0.030..0.434 rows=672 loops=2)

32. 0.546 0.546 ↑ 1.0 336 2

Index Scan using pk_companyname on companyname co_1 (cost=0.28..35.63 rows=340 width=4) (actual time=0.015..0.273 rows=336 loops=2)

  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
  • Rows Removed by Filter: 217
33. 0.000 0.000 ↓ 2.0 2 672

Materialize (cost=0.14..2.17 rows=1 width=13) (actual time=0.000..0.000 rows=2 loops=672)

34. 0.018 0.018 ↓ 2.0 2 2

Index Only Scan using pk_assigned_roles on assigned_roles sr_1 (cost=0.14..2.16 rows=1 width=13) (actual time=0.008..0.009 rows=2 loops=2)

  • Index Cond: (personid = p_4.personid)
  • Heap Fetches: 4
35. 0.002 0.058 ↓ 0.0 0 2

Unique (cost=3.65..3.66 rows=1 width=65) (actual time=0.029..0.029 rows=0 loops=2)

36. 0.016 0.056 ↓ 0.0 0 2

Sort (cost=3.65..3.65 rows=1 width=65) (actual time=0.028..0.028 rows=0 loops=2)

  • Sort Key: pr_1.companyid
  • Sort Method: quicksort Memory: 25kB
37. 0.018 0.040 ↓ 0.0 0 2

Hash Join (cost=2.32..3.64 rows=1 width=65) (actual time=0.020..0.020 rows=0 loops=2)

  • Hash Cond: (person_company_rel_type_1.personcompanyreltype = pr_1.personcompanyreltype)
38. 0.004 0.004 ↑ 18.0 1 1

Seq Scan on person_company_rel_type person_company_rel_type_1 (cost=0.00..1.24 rows=18 width=6) (actual time=0.004..0.004 rows=1 loops=1)

  • Filter: (personcompanyrelclass = 'MC'::bpchar)
  • Rows Removed by Filter: 1
39. 0.004 0.018 ↓ 0.0 0 2

Hash (cost=2.31..2.31 rows=1 width=23) (actual time=0.009..0.009 rows=0 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
40. 0.014 0.014 ↓ 0.0 0 2

Index Scan using pk_person_company_rel on person_company_rel pr_1 (cost=0.28..2.31 rows=1 width=23) (actual time=0.007..0.007 rows=0 loops=2)

  • Index Cond: (personid = p_4.personid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
41. 0.000 0.034 ↓ 0.0 0 2

Unique (cost=4.73..4.74 rows=1 width=65) (actual time=0.017..0.017 rows=0 loops=2)

42. 0.012 0.034 ↓ 0.0 0 2

Sort (cost=4.73..4.73 rows=1 width=65) (actual time=0.017..0.017 rows=0 loops=2)

  • Sort Key: oo_1.companyid
  • Sort Method: quicksort Memory: 25kB
43. 0.004 0.022 ↓ 0.0 0 2

Nested Loop (cost=0.56..4.72 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=2)

44. 0.018 0.018 ↓ 0.0 0 2

Index Scan using personemploymentenddate on person_employment ep_1 (cost=0.29..2.33 rows=1 width=17) (actual time=0.009..0.009 rows=0 loops=2)

  • Index Cond: ((personid = p_4.personid) AND (CURRENT_DATE <= enddate) AND (CURRENT_DATE >= effectivedate))
  • Filter: ((emplstatus = 'A'::bpchar) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
45. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_company_company_rel on company_company_rel oo_1 (cost=0.27..2.38 rows=1 width=4) (never executed)

  • Index Cond: ((companyid = ep_1.companyid) AND (companyreltype = 'Af'::bpchar))
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
46. 0.002 0.020 ↓ 0.0 0 2

Unique (cost=5.53..5.54 rows=1 width=65) (actual time=0.010..0.010 rows=0 loops=2)

47. 0.006 0.018 ↓ 0.0 0 2

Sort (cost=5.53..5.54 rows=1 width=65) (actual time=0.009..0.009 rows=0 loops=2)

  • Sort Key: ol_1.companyid
  • Sort Method: quicksort Memory: 25kB
48. 0.002 0.012 ↓ 0.0 0 2

Nested Loop (cost=0.42..5.52 rows=1 width=65) (actual time=0.006..0.006 rows=0 loops=2)

49. 0.010 0.010 ↓ 0.0 0 2

Index Scan using pk_person_location_rel on person_location_rel pl_2 (cost=0.14..3.21 rows=1 width=17) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (personid = p_4.personid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
50. 0.000 0.000 ↓ 0.0 0

Index Scan using locationcompanyid on company_location_rel ol_1 (cost=0.28..2.30 rows=1 width=8) (never executed)

  • Index Cond: (locationid = pl_2.locationid)
  • Filter: ((CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
51. 0.000 0.024 ↓ 0.0 0 2

Unique (cost=10.04..10.05 rows=1 width=65) (actual time=0.012..0.012 rows=0 loops=2)

52. 0.006 0.024 ↓ 0.0 0 2

Sort (cost=10.04..10.05 rows=1 width=65) (actual time=0.012..0.012 rows=0 loops=2)

  • Sort Key: oc_2.companyid
  • Sort Method: quicksort Memory: 25kB
53. 0.002 0.018 ↓ 0.0 0 2

Nested Loop (cost=0.85..10.03 rows=1 width=65) (actual time=0.009..0.009 rows=0 loops=2)

54. 0.002 0.016 ↓ 0.0 0 2

Nested Loop (cost=0.57..4.77 rows=1 width=17) (actual time=0.008..0.008 rows=0 loops=2)

55. 0.014 0.014 ↓ 0.0 0 2

Index Scan using pers_pos_personid_idx on pers_pos pc_2 (cost=0.29..2.33 rows=1 width=17) (actual time=0.007..0.007 rows=0 loops=2)

  • Index Cond: (personid = p_4.personid)
  • Filter: ((persposrel = 'Occupies'::bpchar) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
56. 0.000 0.000 ↓ 0.0 0

Index Scan using pos_org_rel_positionid_idx on pos_org_rel por_2 (cost=0.29..2.43 rows=1 width=8) (never executed)

  • Index Cond: (positionid = pc_2.positionid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts) AND (posorgreltype = ANY ('{BAdmin,BenMgr,HRGen,PRMgr,PRSupr}'::bpchar[])))
57. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_company_organization_rel on company_organization_rel oc_2 (cost=0.28..5.26 rows=1 width=8) (never executed)

  • Index Cond: (organizationid = por_2.organizationid)
  • Filter: ((companyorganizationreltype = 'Mem'::bpchar) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
58. 0.000 0.022 ↓ 0.0 0 2

Unique (cost=2.32..2.33 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=2)

59. 0.010 0.022 ↓ 0.0 0 2

Sort (cost=2.32..2.33 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=2)

  • Sort Key: pe_2.companyid
  • Sort Method: quicksort Memory: 25kB
60. 0.012 0.012 ↓ 0.0 0 2

Index Scan using personemploymentenddate on person_employment pe_2 (cost=0.29..2.31 rows=1 width=65) (actual time=0.006..0.006 rows=0 loops=2)

  • Index Cond: ((personid = p_4.personid) AND (CURRENT_DATE <= enddate) AND (CURRENT_DATE >= effectivedate))
61. 0.006 0.020 ↓ 0.0 0 2

Sort (cost=5.77..5.78 rows=4 width=65) (actual time=0.010..0.010 rows=0 loops=2)

  • Sort Key: pd_1.companyid
  • Sort Method: quicksort Memory: 25kB
62. 0.004 0.014 ↓ 0.0 0 2

Nested Loop (cost=0.57..5.69 rows=4 width=65) (actual time=0.007..0.007 rows=0 loops=2)

63. 0.010 0.010 ↓ 0.0 0 2

Index Scan using pers_pos_personid_idx on pers_pos pp_1 (cost=0.29..2.32 rows=1 width=17) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (personid = p_4.personid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
64. 0.000 0.000 ↓ 0.0 0

Index Scan using position_desc_positionid_idx on position_desc pd_1 (cost=0.29..3.36 rows=1 width=8) (never executed)

  • Index Cond: (positionid = pp_1.positionid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
65. 0.002 0.020 ↓ 0.0 0 2

Unique (cost=12.76..12.76 rows=1 width=65) (actual time=0.010..0.010 rows=0 loops=2)

66. 0.006 0.018 ↓ 0.0 0 2

Sort (cost=12.76..12.76 rows=1 width=65) (actual time=0.009..0.009 rows=0 loops=2)

  • Sort Key: oc_3.companyid
  • Sort Method: quicksort Memory: 25kB
67. 0.002 0.012 ↓ 0.0 0 2

Nested Loop (cost=0.42..12.75 rows=1 width=65) (actual time=0.006..0.006 rows=0 loops=2)

68. 0.010 0.010 ↓ 0.0 0 2

Index Scan using pk_person_organization_rel on person_organization_rel pc_3 (cost=0.14..2.22 rows=1 width=17) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (personid = p_4.personid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
69. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_company_organization_rel on company_organization_rel oc_3 (cost=0.28..10.52 rows=1 width=8) (never executed)

  • Index Cond: (organizationid = pc_3.organizationid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
70. 0.000 0.022 ↓ 0.0 0 2

Unique (cost=3.80..3.80 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=2)

71. 0.010 0.022 ↓ 0.0 0 2

Sort (cost=3.80..3.80 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=2)

  • Sort Key: pu_1.companyid
  • Sort Method: quicksort Memory: 25kB
72. 0.002 0.012 ↓ 0.0 0 2

Nested Loop (cost=0.27..3.79 rows=1 width=65) (actual time=0.006..0.006 rows=0 loops=2)

73. 0.010 0.010 ↓ 0.0 0 2

Seq Scan on person_pay_unit_rel ppur_1 (cost=0.00..1.49 rows=1 width=17) (actual time=0.005..0.005 rows=0 loops=2)

  • Filter: ((personid = p_4.personid) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
  • Rows Removed by Filter: 15
74. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_pay_unit on pay_unit pu_1 (cost=0.27..2.29 rows=1 width=8) (never executed)

  • Index Cond: (payunitid = ppur_1.payunitid)
75. 0.002 0.020 ↓ 0.0 0 2

Unique (cost=2.33..2.34 rows=1 width=65) (actual time=0.010..0.010 rows=0 loops=2)

76. 0.008 0.018 ↓ 0.0 0 2

Sort (cost=2.33..2.34 rows=1 width=65) (actual time=0.009..0.009 rows=0 loops=2)

  • Sort Key: pe_3.companyid
  • Sort Method: quicksort Memory: 25kB
77. 0.010 0.010 ↓ 0.0 0 2

Index Scan using personemploymentenddate on person_employment pe_3 (cost=0.29..2.32 rows=1 width=65) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: ((personid = p_4.personid) AND (CURRENT_DATE < effectivedate))
  • Filter: (effectivedate < enddate)
78. 0.006 0.012 ↓ 0.0 0 2

Sort (cost=3.47..3.47 rows=2 width=65) (actual time=0.006..0.006 rows=0 loops=2)

  • Sort Key: cs_1.companyid
  • Sort Method: quicksort Memory: 25kB
79. 0.002 0.006 ↓ 0.0 0 2

Nested Loop (cost=0.14..3.44 rows=2 width=65) (actual time=0.003..0.003 rows=0 loops=2)

80. 0.004 0.004 ↓ 0.0 0 2

Seq Scan on person_customer_rel pcr_3 (cost=0.00..1.16 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=2)

  • Filter: ((personid = p_4.personid) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
  • Rows Removed by Filter: 5
81. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_customer_struct on customer_struct cs_1 (cost=0.14..2.25 rows=2 width=8) (never executed)

  • Index Cond: (customerid = pcr_3.customerid)
  • Filter: ((companyid IS NOT NULL) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
82. 0.005 0.044 ↑ 1.0 6 4

Materialize (cost=0.56..13.59 rows=6 width=9) (actual time=0.008..0.011 rows=6 loops=4)

83. 0.001 0.039 ↑ 1.0 6 1

Append (cost=0.56..13.56 rows=6 width=9) (actual time=0.028..0.039 rows=6 loops=1)

84. 0.001 0.034 ↓ 1.2 6 1

Subquery Scan on *SELECT* 1_2 (cost=0.56..12.06 rows=5 width=9) (actual time=0.028..0.034 rows=6 loops=1)

85. 0.002 0.033 ↓ 1.2 6 1

Nested Loop Anti Join (cost=0.56..12.01 rows=5 width=169) (actual time=0.028..0.033 rows=6 loops=1)

  • Join Filter: ((crv.companyid = cn.companyid) AND (crv.viewname = rv.viewname) AND (crv.rolename = rv.rolename))
86. 0.000 0.025 ↑ 1.0 6 1

Nested Loop (cost=0.56..10.39 rows=6 width=44) (actual time=0.021..0.025 rows=6 loops=1)

87. 0.015 0.015 ↑ 1.0 6 1

Index Only Scan using role_viewsviewname on role_views rv (cost=0.29..7.34 rows=6 width=40) (actual time=0.013..0.015 rows=6 loops=1)

  • Index Cond: (viewname = 'COMPPLANDESC'::bpchar)
  • Heap Fetches: 6
88. 0.006 0.012 ↑ 1.0 1 6

Materialize (cost=0.28..2.98 rows=1 width=4) (actual time=0.001..0.002 rows=1 loops=6)

89. 0.006 0.006 ↑ 1.0 1 1

Index Scan using pk_companyname on companyname cn (cost=0.28..2.97 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (companyid = 52155)
  • Filter: ((CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts) AND (CURRENT_DATE < enddate))
  • Rows Removed by Filter: 1
90. 0.002 0.006 ↓ 0.0 0 6

Materialize (cost=0.00..1.49 rows=1 width=44) (actual time=0.001..0.001 rows=0 loops=6)

91. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on company_role_views crv (cost=0.00..1.49 rows=1 width=44) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: ((companyid = 52155) AND (viewname = 'COMPPLANDESC'::bpchar) AND (negative = 'Y'::bpchar))
  • Rows Removed by Filter: 28
92. 0.000 0.004 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2_3 (cost=0.00..1.50 rows=1 width=9) (actual time=0.004..0.004 rows=0 loops=1)

93. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on company_role_views rv_1 (cost=0.00..1.49 rows=1 width=169) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: ((negative = 'N'::bpchar) AND (companyid = 52155) AND (viewname = 'COMPPLANDESC'::bpchar))
  • Rows Removed by Filter: 28
94. 0.002 289.634 ↑ 1.2 4 1

Subquery Scan on *SELECT* 2_1 (cost=154,571,903.65..154,571,903.73 rows=5 width=112) (actual time=289.631..289.634 rows=4 loops=1)

95. 0.002 289.632 ↑ 1.2 4 1

Unique (cost=154,571,903.65..154,571,903.68 rows=5 width=112) (actual time=289.630..289.632 rows=4 loops=1)

96. 0.012 289.630 ↑ 1.2 4 1

Sort (cost=154,571,903.65..154,571,903.67 rows=5 width=112) (actual time=289.630..289.630 rows=4 loops=1)

  • Sort Key: ((r_all.rolename)::character(8))
  • Sort Method: quicksort Memory: 25kB
97. 0.004 289.618 ↑ 1.2 4 1

Subquery Scan on r_all (cost=154,571,903.44..154,571,903.59 rows=5 width=112) (actual time=289.616..289.618 rows=4 loops=1)

98. 0.024 289.614 ↑ 1.2 4 1

HashAggregate (cost=154,571,903.44..154,571,903.49 rows=5 width=168) (actual time=289.613..289.614 rows=4 loops=1)

  • Group Key: ar.personid, ar.personid, ar.rolename, (''::text)
99. 0.006 289.590 ↓ 1.6 8 1

Append (cost=0.14..154,571,903.39 rows=5 width=168) (actual time=0.016..289.590 rows=8 loops=1)

100. 0.017 0.017 ↑ 1.0 2 1

Index Only Scan using pk_assigned_roles on assigned_roles ar (cost=0.14..2.62 rows=2 width=67) (actual time=0.016..0.017 rows=2 loops=1)

  • Index Cond: (personid = '25980 '::bpchar)
  • Heap Fetches: 2
101. 0.000 110.813 ↓ 4.0 4 1

Nested Loop (cost=2,000.00..70,538.72 rows=1 width=90) (actual time=1.276..110.813 rows=4 loops=1)

102. 0.000 17.107 ↓ 2.0 2 1

Gather (cost=1,000.00..35,269.36 rows=1 width=13) (actual time=0.688..17.107 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
103. 45.648 45.648 ↑ 1.0 1 3 / 3

Parallel Seq Scan on person p_5 (cost=0.00..34,269.26 rows=1 width=13) (actual time=35.565..45.648 rows=1 loops=3)

  • Filter: (personid = '25980 '::bpchar)
  • Rows Removed by Filter: 467408
104. 4.498 93.770 ↓ 2.0 2 2

Gather (cost=1,000.00..35,269.36 rows=1 width=13) (actual time=0.302..46.885 rows=2 loops=2)

  • Workers Planned: 2
  • Workers Launched: 2
105. 89.272 89.272 ↑ 1.0 1 6 / 3

Parallel Seq Scan on person p2 (cost=0.00..34,269.26 rows=1 width=13) (actual time=26.864..44.636 rows=1 loops=6)

  • Filter: (personid = '25980 '::bpchar)
  • Rows Removed by Filter: 467408
106. 130.039 131.427 ↓ 2.0 2 1

Seq Scan on person p_6 (cost=0.00..154,466,090.21 rows=1 width=94) (actual time=0.739..131.427 rows=2 loops=1)

  • Filter: ((personid = '25980 '::bpchar) AND ((SubPlan 1) > 1))
  • Rows Removed by Filter: 1402223
107.          

SubPlan (for Seq Scan)

108. 0.090 1.388 ↑ 1.0 1 2

Aggregate (cost=110.11..110.12 rows=1 width=8) (actual time=0.694..0.694 rows=1 loops=2)

109. 0.060 1.298 ↓ 1.1 336 2

Merge Append (cost=55.02..106.39 rows=298 width=65) (actual time=0.143..0.649 rows=336 loops=2)

  • Sort Key: co.companyid
110. 0.148 1.018 ↓ 1.2 336 2

Unique (cost=0.42..42.90 rows=284 width=65) (actual time=0.027..0.509 rows=336 loops=2)

111. 0.316 0.870 ↓ 2.0 672 2

Nested Loop (cost=0.42..42.05 rows=340 width=65) (actual time=0.026..0.435 rows=672 loops=2)

112. 0.554 0.554 ↑ 1.0 336 2

Index Scan using pk_companyname on companyname co (cost=0.28..35.63 rows=340 width=4) (actual time=0.013..0.277 rows=336 loops=2)

  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
  • Rows Removed by Filter: 217
113. 0.000 0.000 ↓ 2.0 2 672

Materialize (cost=0.14..2.17 rows=1 width=13) (actual time=0.000..0.000 rows=2 loops=672)

114. 0.020 0.020 ↓ 2.0 2 2

Index Only Scan using pk_assigned_roles on assigned_roles sr (cost=0.14..2.16 rows=1 width=13) (actual time=0.009..0.010 rows=2 loops=2)

  • Index Cond: (personid = p_6.personid)
  • Heap Fetches: 4
115. 0.002 0.044 ↓ 0.0 0 2

Unique (cost=3.65..3.66 rows=1 width=65) (actual time=0.022..0.022 rows=0 loops=2)

116. 0.014 0.042 ↓ 0.0 0 2

Sort (cost=3.65..3.65 rows=1 width=65) (actual time=0.021..0.021 rows=0 loops=2)

  • Sort Key: pr.companyid
  • Sort Method: quicksort Memory: 25kB
117. 0.010 0.028 ↓ 0.0 0 2

Hash Join (cost=2.32..3.64 rows=1 width=65) (actual time=0.014..0.014 rows=0 loops=2)

  • Hash Cond: (person_company_rel_type.personcompanyreltype = pr.personcompanyreltype)
118. 0.004 0.004 ↑ 18.0 1 1

Seq Scan on person_company_rel_type (cost=0.00..1.24 rows=18 width=6) (actual time=0.004..0.004 rows=1 loops=1)

  • Filter: (personcompanyrelclass = 'MC'::bpchar)
  • Rows Removed by Filter: 1
119. 0.002 0.014 ↓ 0.0 0 2

Hash (cost=2.31..2.31 rows=1 width=23) (actual time=0.007..0.007 rows=0 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
120. 0.012 0.012 ↓ 0.0 0 2

Index Scan using pk_person_company_rel on person_company_rel pr (cost=0.28..2.31 rows=1 width=23) (actual time=0.006..0.006 rows=0 loops=2)

  • Index Cond: (personid = p_6.personid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
121. 0.002 0.022 ↓ 0.0 0 2

Unique (cost=4.73..4.74 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=2)

122. 0.002 0.020 ↓ 0.0 0 2

Sort (cost=4.73..4.73 rows=1 width=65) (actual time=0.010..0.010 rows=0 loops=2)

  • Sort Key: oo.companyid
  • Sort Method: quicksort Memory: 25kB
123. 0.004 0.018 ↓ 0.0 0 2

Nested Loop (cost=0.56..4.72 rows=1 width=65) (actual time=0.009..0.009 rows=0 loops=2)

124. 0.014 0.014 ↓ 0.0 0 2

Index Scan using personemploymentenddate on person_employment ep (cost=0.29..2.33 rows=1 width=17) (actual time=0.007..0.007 rows=0 loops=2)

  • Index Cond: ((personid = p_6.personid) AND (CURRENT_DATE <= enddate) AND (CURRENT_DATE >= effectivedate))
  • Filter: ((emplstatus = 'A'::bpchar) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
125. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_company_company_rel on company_company_rel oo (cost=0.27..2.38 rows=1 width=4) (never executed)

  • Index Cond: ((companyid = ep.companyid) AND (companyreltype = 'Af'::bpchar))
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
126. 0.002 0.012 ↓ 0.0 0 2

Unique (cost=5.53..5.54 rows=1 width=65) (actual time=0.006..0.006 rows=0 loops=2)

127. 0.002 0.010 ↓ 0.0 0 2

Sort (cost=5.53..5.54 rows=1 width=65) (actual time=0.005..0.005 rows=0 loops=2)

  • Sort Key: ol.companyid
  • Sort Method: quicksort Memory: 25kB
128. 0.002 0.008 ↓ 0.0 0 2

Nested Loop (cost=0.42..5.52 rows=1 width=65) (actual time=0.004..0.004 rows=0 loops=2)

129. 0.006 0.006 ↓ 0.0 0 2

Index Scan using pk_person_location_rel on person_location_rel pl_1 (cost=0.14..3.21 rows=1 width=17) (actual time=0.003..0.003 rows=0 loops=2)

  • Index Cond: (personid = p_6.personid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
130. 0.000 0.000 ↓ 0.0 0

Index Scan using locationcompanyid on company_location_rel ol (cost=0.28..2.30 rows=1 width=8) (never executed)

  • Index Cond: (locationid = pl_1.locationid)
  • Filter: ((CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
131. 0.000 0.022 ↓ 0.0 0 2

Unique (cost=10.04..10.05 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=2)

132. 0.004 0.022 ↓ 0.0 0 2

Sort (cost=10.04..10.05 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=2)

  • Sort Key: oc.companyid
  • Sort Method: quicksort Memory: 25kB
133. 0.000 0.018 ↓ 0.0 0 2

Nested Loop (cost=0.85..10.03 rows=1 width=65) (actual time=0.009..0.009 rows=0 loops=2)

134. 0.002 0.018 ↓ 0.0 0 2

Nested Loop (cost=0.57..4.77 rows=1 width=17) (actual time=0.009..0.009 rows=0 loops=2)

135. 0.016 0.016 ↓ 0.0 0 2

Index Scan using pers_pos_personid_idx on pers_pos pc (cost=0.29..2.33 rows=1 width=17) (actual time=0.008..0.008 rows=0 loops=2)

  • Index Cond: (personid = p_6.personid)
  • Filter: ((persposrel = 'Occupies'::bpchar) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
136. 0.000 0.000 ↓ 0.0 0

Index Scan using pos_org_rel_positionid_idx on pos_org_rel por_1 (cost=0.29..2.43 rows=1 width=8) (never executed)

  • Index Cond: (positionid = pc.positionid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts) AND (posorgreltype = ANY ('{BAdmin,BenMgr,HRGen,PRMgr,PRSupr}'::bpchar[])))
137. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_company_organization_rel on company_organization_rel oc (cost=0.28..5.26 rows=1 width=8) (never executed)

  • Index Cond: (organizationid = por_1.organizationid)
  • Filter: ((companyorganizationreltype = 'Mem'::bpchar) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
138. 0.002 0.028 ↓ 0.0 0 2

Unique (cost=2.32..2.33 rows=1 width=65) (actual time=0.014..0.014 rows=0 loops=2)

139. 0.012 0.026 ↓ 0.0 0 2

Sort (cost=2.32..2.33 rows=1 width=65) (actual time=0.013..0.013 rows=0 loops=2)

  • Sort Key: pe.companyid
  • Sort Method: quicksort Memory: 25kB
140. 0.014 0.014 ↓ 0.0 0 2

Index Scan using personemploymentenddate on person_employment pe (cost=0.29..2.31 rows=1 width=65) (actual time=0.007..0.007 rows=0 loops=2)

  • Index Cond: ((personid = p_6.personid) AND (CURRENT_DATE <= enddate) AND (CURRENT_DATE >= effectivedate))
141. 0.006 0.018 ↓ 0.0 0 2

Sort (cost=5.77..5.78 rows=4 width=65) (actual time=0.009..0.009 rows=0 loops=2)

  • Sort Key: pd.companyid
  • Sort Method: quicksort Memory: 25kB
142. 0.002 0.012 ↓ 0.0 0 2

Nested Loop (cost=0.57..5.69 rows=4 width=65) (actual time=0.006..0.006 rows=0 loops=2)

143. 0.010 0.010 ↓ 0.0 0 2

Index Scan using pers_pos_personid_idx on pers_pos pp (cost=0.29..2.32 rows=1 width=17) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (personid = p_6.personid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
144. 0.000 0.000 ↓ 0.0 0

Index Scan using position_desc_positionid_idx on position_desc pd (cost=0.29..3.36 rows=1 width=8) (never executed)

  • Index Cond: (positionid = pp.positionid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
145. 0.002 0.020 ↓ 0.0 0 2

Unique (cost=12.76..12.76 rows=1 width=65) (actual time=0.010..0.010 rows=0 loops=2)

146. 0.006 0.018 ↓ 0.0 0 2

Sort (cost=12.76..12.76 rows=1 width=65) (actual time=0.009..0.009 rows=0 loops=2)

  • Sort Key: oc_1.companyid
  • Sort Method: quicksort Memory: 25kB
147. 0.002 0.012 ↓ 0.0 0 2

Nested Loop (cost=0.42..12.75 rows=1 width=65) (actual time=0.006..0.006 rows=0 loops=2)

148. 0.010 0.010 ↓ 0.0 0 2

Index Scan using pk_person_organization_rel on person_organization_rel pc_1 (cost=0.14..2.22 rows=1 width=17) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (personid = p_6.personid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
149. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_company_organization_rel on company_organization_rel oc_1 (cost=0.28..10.52 rows=1 width=8) (never executed)

  • Index Cond: (organizationid = pc_1.organizationid)
  • Filter: ((CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
150. 0.002 0.020 ↓ 0.0 0 2

Unique (cost=3.80..3.80 rows=1 width=65) (actual time=0.010..0.010 rows=0 loops=2)

151. 0.006 0.018 ↓ 0.0 0 2

Sort (cost=3.80..3.80 rows=1 width=65) (actual time=0.009..0.009 rows=0 loops=2)

  • Sort Key: pu.companyid
  • Sort Method: quicksort Memory: 25kB
152. 0.002 0.012 ↓ 0.0 0 2

Nested Loop (cost=0.27..3.79 rows=1 width=65) (actual time=0.006..0.006 rows=0 loops=2)

153. 0.010 0.010 ↓ 0.0 0 2

Seq Scan on person_pay_unit_rel ppur (cost=0.00..1.49 rows=1 width=17) (actual time=0.005..0.005 rows=0 loops=2)

  • Filter: ((personid = p_6.personid) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
  • Rows Removed by Filter: 15
154. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_pay_unit on pay_unit pu (cost=0.27..2.29 rows=1 width=8) (never executed)

  • Index Cond: (payunitid = ppur.payunitid)
155. 0.000 0.020 ↓ 0.0 0 2

Unique (cost=2.33..2.34 rows=1 width=65) (actual time=0.010..0.010 rows=0 loops=2)

156. 0.010 0.020 ↓ 0.0 0 2

Sort (cost=2.33..2.34 rows=1 width=65) (actual time=0.010..0.010 rows=0 loops=2)

  • Sort Key: pe_1.companyid
  • Sort Method: quicksort Memory: 25kB
157. 0.010 0.010 ↓ 0.0 0 2

Index Scan using personemploymentenddate on person_employment pe_1 (cost=0.29..2.32 rows=1 width=65) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: ((personid = p_6.personid) AND (CURRENT_DATE < effectivedate))
  • Filter: (effectivedate < enddate)
158. 0.008 0.014 ↓ 0.0 0 2

Sort (cost=3.47..3.47 rows=2 width=65) (actual time=0.007..0.007 rows=0 loops=2)

  • Sort Key: cs.companyid
  • Sort Method: quicksort Memory: 25kB
159. 0.002 0.006 ↓ 0.0 0 2

Nested Loop (cost=0.14..3.44 rows=2 width=65) (actual time=0.003..0.003 rows=0 loops=2)

160. 0.004 0.004 ↓ 0.0 0 2

Seq Scan on person_customer_rel pcr_2 (cost=0.00..1.16 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=2)

  • Filter: ((personid = p_6.personid) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
  • Rows Removed by Filter: 5
161. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_customer_struct on customer_struct cs (cost=0.14..2.25 rows=2 width=8) (never executed)

  • Index Cond: (customerid = pcr_2.customerid)
  • Filter: ((companyid IS NOT NULL) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
162. 0.000 47.327 ↓ 0.0 0 1

Nested Loop Semi Join (cost=1,001.17..35,271.80 rows=1 width=94) (actual time=47.326..47.327 rows=0 loops=1)

163. 3.481 48.168 ↓ 2.0 2 1

Gather (cost=1,000.00..35,269.36 rows=1 width=13) (actual time=0.709..48.168 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
164. 44.687 44.687 ↑ 1.0 1 3 / 3

Parallel Seq Scan on person p_7 (cost=0.00..34,269.26 rows=1 width=13) (actual time=24.674..44.687 rows=1 loops=3)

  • Filter: (personid = '25980 '::bpchar)
  • Rows Removed by Filter: 467408
165. 0.012 0.022 ↓ 0.0 0 2

Hash Join (cost=1.18..2.43 rows=1 width=13) (actual time=0.011..0.011 rows=0 loops=2)

  • Hash Cond: (pcrt.personcustomerreltype = pcr_1.personcustomerreltype)
166. 0.006 0.006 ↑ 1.8 10 2

Seq Scan on person_customer_rel_type pcrt (cost=0.00..1.18 rows=18 width=6) (actual time=0.003..0.003 rows=10 loops=2)

  • Filter: (rolename IS NOT NULL)
167. 0.000 0.004 ↓ 0.0 0 1

Hash (cost=1.16..1.16 rows=1 width=19) (actual time=0.004..0.004 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
168. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on person_customer_rel pcr_1 (cost=0.00..1.16 rows=1 width=19) (actual time=0.003..0.004 rows=0 loops=1)

  • Filter: ((personid = '25980 '::bpchar) AND (CURRENT_DATE >= effectivedate) AND (CURRENT_DATE <= enddate) AND (CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts))
  • Rows Removed by Filter: 5
169. 0.005 0.068 ↑ 1.0 6 1

Hash (cost=13.56..13.56 rows=6 width=9) (actual time=0.067..0.068 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
170. 0.000 0.063 ↑ 1.0 6 1

Append (cost=0.56..13.56 rows=6 width=9) (actual time=0.047..0.063 rows=6 loops=1)

171. 0.002 0.058 ↓ 1.2 6 1

Subquery Scan on *SELECT* 1 (cost=0.56..12.06 rows=5 width=9) (actual time=0.047..0.058 rows=6 loops=1)

172. 0.000 0.056 ↓ 1.2 6 1

Nested Loop Anti Join (cost=0.56..12.01 rows=5 width=169) (actual time=0.047..0.056 rows=6 loops=1)

  • Join Filter: ((crv_1.companyid = cn_1.companyid) AND (crv_1.viewname = rv_2.viewname) AND (crv_1.rolename = rv_2.rolename))
173. 0.000 0.045 ↑ 1.0 6 1

Nested Loop (cost=0.56..10.39 rows=6 width=44) (actual time=0.036..0.045 rows=6 loops=1)

174. 0.027 0.027 ↑ 1.0 6 1

Index Only Scan using role_viewsviewname on role_views rv_2 (cost=0.29..7.34 rows=6 width=40) (actual time=0.022..0.027 rows=6 loops=1)

  • Index Cond: (viewname = 'COMPPLANDESC'::bpchar)
  • Heap Fetches: 6
175. 0.007 0.018 ↑ 1.0 1 6

Materialize (cost=0.28..2.98 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=6)

176. 0.011 0.011 ↑ 1.0 1 1

Index Scan using pk_companyname on companyname cn_1 (cost=0.28..2.97 rows=1 width=4) (actual time=0.010..0.011 rows=1 loops=1)

  • Index Cond: (companyid = 52155)
  • Filter: ((CURRENT_TIMESTAMP >= createts) AND (CURRENT_TIMESTAMP <= endts) AND (CURRENT_DATE < enddate))
  • Rows Removed by Filter: 1
177. 0.004 0.012 ↓ 0.0 0 6

Materialize (cost=0.00..1.49 rows=1 width=44) (actual time=0.002..0.002 rows=0 loops=6)

178. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on company_role_views crv_1 (cost=0.00..1.49 rows=1 width=44) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: ((companyid = 52155) AND (viewname = 'COMPPLANDESC'::bpchar) AND (negative = 'Y'::bpchar))
  • Rows Removed by Filter: 28
179. 0.000 0.005 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.00..1.50 rows=1 width=9) (actual time=0.005..0.005 rows=0 loops=1)

180. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on company_role_views rv_3 (cost=0.00..1.49 rows=1 width=169) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: ((negative = 'N'::bpchar) AND (companyid = 52155) AND (viewname = 'COMPPLANDESC'::bpchar))
  • Rows Removed by Filter: 28
Planning time : 21.878 ms
Execution time : 519.377 ms