explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9CGT

Settings
# exclusive inclusive rows x rows loops node
1. 1.025 1,196.530 ↓ 15.8 63 1

Nested Loop Left Join (cost=165,474.73..166,874.98 rows=4 width=394) (actual time=1,143.609..1,196.530 rows=63 loops=1)

  • Filter: (u.parent_unit_id IS NULL)
  • Rows Removed by Filter: 1953
2. 0.036 1,163.186 ↓ 63.0 63 1

Nested Loop Left Join (cost=165,474.45..165,550.22 rows=1 width=386) (actual time=1,142.859..1,163.186 rows=63 loops=1)

3. 0.038 1,162.853 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,474.03..165,549.65 rows=1 width=378) (actual time=1,142.845..1,162.853 rows=33 loops=1)

4. 0.048 1,162.551 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,473.60..165,548.79 rows=1 width=344) (actual time=1,142.828..1,162.551 rows=33 loops=1)

5. 0.038 1,162.272 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,473.17..165,548.25 rows=1 width=336) (actual time=1,142.812..1,162.272 rows=33 loops=1)

6. 0.046 1,162.003 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,472.75..165,547.74 rows=1 width=343) (actual time=1,142.796..1,162.003 rows=33 loops=1)

7. 0.050 1,161.957 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,472.46..165,547.43 rows=1 width=338) (actual time=1,142.792..1,161.957 rows=33 loops=1)

8. 0.043 1,161.907 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,472.04..165,546.25 rows=1 width=338) (actual time=1,142.788..1,161.907 rows=33 loops=1)

9. 0.050 1,161.732 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,471.76..165,545.94 rows=1 width=333) (actual time=1,142.775..1,161.732 rows=33 loops=1)

10. 0.056 1,161.451 ↓ 33.0 33 1

Nested Loop (cost=165,471.34..165,537.49 rows=1 width=325) (actual time=1,142.749..1,161.451 rows=33 loops=1)

  • Join Filter: (mt.permit_request_id = caa.case_id)
11. 0.073 1,161.098 ↓ 33.0 33 1

Nested Loop (cost=165,470.91..165,536.90 rows=1 width=333) (actual time=1,142.727..1,161.098 rows=33 loops=1)

  • Join Filter: (mt.permit_request_id = pr.id)
12. 0.054 1,160.794 ↓ 33.0 33 1

Nested Loop (cost=165,470.48..165,536.39 rows=1 width=317) (actual time=1,142.697..1,160.794 rows=33 loops=1)

13. 0.032 1,160.443 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,470.06..165,527.94 rows=1 width=172) (actual time=1,142.668..1,160.443 rows=33 loops=1)

14. 0.053 1,160.378 ↓ 33.0 33 1

Nested Loop Left Join (cost=165,469.77..165,527.62 rows=1 width=172) (actual time=1,142.663..1,160.378 rows=33 loops=1)

15. 10.686 1,160.292 ↓ 33.0 33 1

Subquery Scan on mt (cost=165,469.36..165,519.18 rows=1 width=148) (actual time=1,142.654..1,160.292 rows=33 loops=1)

  • Filter: ((NOT mt.deleted) AND (mt.meeting_id = 18589))
  • Rows Removed by Filter: 113658
16. 78.123 1,149.606 ↓ 74.2 113,691 1

WindowAgg (cost=165,469.36..165,500.02 rows=1,533 width=149) (actual time=1,051.534..1,149.606 rows=113,691 loops=1)

17. 148.159 1,071.483 ↓ 74.2 113,691 1

Sort (cost=165,469.36..165,473.19 rows=1,533 width=149) (actual time=1,051.520..1,071.483 rows=113,691 loops=1)

  • Sort Key: top.permit_request_id, top.start_time
  • Sort Method: quicksort Memory: 32191kB
18. 155.497 923.324 ↓ 74.2 113,691 1

Hash Left Join (cost=6,923.55..165,388.24 rows=1,533 width=149) (actual time=134.479..923.324 rows=113,691 loops=1)

  • Hash Cond: (top.meeting_id = meeting.id)
  • Filter: (((inq.* IS NULL) OR ((inq.start_date)::date <= (meeting.planned_date)::date)) AND ((inq.* IS NULL) OR (SubPlan 22)))
  • Rows Removed by Filter: 4931
19. 99.299 335.794 ↓ 13.1 118,622 1

Hash Left Join (cost=6,619.65..14,025.52 rows=9,059 width=283) (actual time=131.188..335.794 rows=118,622 loops=1)

  • Hash Cond: (top.permit_request_id = pinq.request_id)
  • Filter: ((inq.* IS NULL) OR (inq.managing_authority_id = ccmeeting.managing_authority_id) OR (inq.managing_authority_id = 20))
  • Rows Removed by Filter: 82
20. 79.494 109.009 ↑ 1.0 114,287 1

Hash Left Join (cost=337.54..5,321.67 rows=114,700 width=125) (actual time=3.212..109.009 rows=114,287 loops=1)

  • Hash Cond: (top.meeting_id = ccmeeting.id)
21. 26.393 26.393 ↑ 1.0 114,287 1

Seq Scan on meeting_topic_t top (cost=0.00..3,407.00 rows=114,700 width=117) (actual time=0.007..26.393 rows=114,287 loops=1)

22. 1.556 3.122 ↑ 1.0 9,402 1

Hash (cost=220.02..220.02 rows=9,402 width=16) (actual time=3.122..3.122 rows=9,402 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 569kB
23. 1.566 1.566 ↑ 1.0 9,402 1

Seq Scan on cc_meeting_t ccmeeting (cost=0.00..220.02 rows=9,402 width=16) (actual time=0.006..1.566 rows=9,402 loops=1)

24. 30.013 127.486 ↑ 1.0 73,317 1

Hash (cost=5,352.11..5,352.11 rows=74,400 width=174) (actual time=127.486..127.486 rows=73,317 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 16464kB
25. 40.895 97.473 ↑ 1.0 73,317 1

Hash Join (cost=3,021.56..5,352.11 rows=74,400 width=174) (actual time=49.293..97.473 rows=73,317 loops=1)

  • Hash Cond: (pinq.inquiry_id = inq.id)
26. 7.763 7.763 ↑ 1.0 73,317 1

Seq Scan on permit_request_inquiries_t pinq (cost=0.00..1,304.67 rows=75,167 width=16) (actual time=0.006..7.763 rows=73,317 loops=1)

27. 26.858 48.815 ↑ 1.0 73,200 1

Hash (cost=2,092.36..2,092.36 rows=74,336 width=166) (actual time=48.815..48.815 rows=73,200 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 15868kB
28. 21.957 21.957 ↑ 1.0 73,200 1

Seq Scan on inquiry_t inq (cost=0.00..2,092.36 rows=74,336 width=166) (actual time=0.016..21.957 rows=73,200 loops=1)

29. 1.691 3.201 ↑ 1.0 9,535 1

Hash (cost=184.51..184.51 rows=9,551 width=16) (actual time=3.201..3.201 rows=9,535 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 575kB
30. 1.510 1.510 ↑ 1.0 9,535 1

Seq Scan on meeting_t meeting (cost=0.00..184.51 rows=9,551 width=16) (actual time=0.009..1.510 rows=9,535 loops=1)

31.          

SubPlan (forHash Left Join)

32. 0.000 428.832 ↑ 1.0 1 71,472

Aggregate (cost=16.65..16.66 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=71,472)

33. 128.110 428.832 ↑ 1.0 1 71,472

Nested Loop (cost=0.58..16.64 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=71,472)

34. 142.944 142.944 ↑ 1.0 1 71,472

Index Scan using permit_request_inquiries_case_idx on permit_request_inquiries_t pi (cost=0.29..8.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=71,472)

  • Index Cond: (request_id = top.permit_request_id)
35. 157.778 157.778 ↑ 1.0 1 78,889

Index Scan using pk_inquiry_t on inquiry_t it (cost=0.29..8.32 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=78,889)

  • Index Cond: (id = pi.inquiry_id)
  • Filter: (((managing_authority_id = ccmeeting.managing_authority_id) OR (managing_authority_id = 20)) AND ((start_date)::date <= (meeting.planned_date)::date))
  • Rows Removed by Filter: 0
36. 0.033 0.033 ↓ 0.0 0 33

Index Scan using pk_meeting_topic_t on meeting_topic_t prev_top (cost=0.42..8.44 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=33)

  • Index Cond: (mt.prev_top_id = id)
37. 0.033 0.033 ↓ 0.0 0 33

Index Scan using pk_meeting_t on meeting_t prevmeeting (cost=0.29..0.31 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=33)

  • Index Cond: (prev_top.meeting_id = id)
38. 0.297 0.297 ↑ 1.0 1 33

Index Scan using pk_case_t on case_t c (cost=0.42..8.44 rows=1 width=145) (actual time=0.008..0.009 rows=1 loops=33)

  • Index Cond: (id = mt.permit_request_id)
39. 0.231 0.231 ↑ 1.0 1 33

Index Scan using pk_permit_request_t on permit_request_t pr (cost=0.42..0.50 rows=1 width=16) (actual time=0.007..0.007 rows=1 loops=33)

  • Index Cond: (id = c.id)
40. 0.297 0.297 ↑ 1.0 1 33

Index Only Scan using pk_case_actor_authority on case_actor_authority_t caa (cost=0.43..0.58 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=33)

  • Index Cond: ((case_id = c.id) AND (authority_abstract_id = 4))
  • Heap Fetches: 33
41. 0.231 0.231 ↑ 1.0 1 33

Index Scan using pk_judgement_t on judgement_t j (cost=0.42..8.44 rows=1 width=16) (actual time=0.007..0.007 rows=1 loops=33)

  • Index Cond: (id = mt.given_judgement_id)
42. 0.132 0.132 ↑ 1.0 1 33

Index Scan using pk_judgement_result_t on judgement_result_t jr (cost=0.28..0.30 rows=1 width=21) (actual time=0.004..0.004 rows=1 loops=33)

  • Index Cond: (id = j.judgement_result_id)
43. 0.000 0.000 ↓ 0.0 0 33

Index Scan using pk_judgement_t on judgement_t jp (cost=0.42..1.16 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=33)

  • Index Cond: (id = prev_top.given_judgement_id)
44. 0.000 0.000 ↓ 0.0 0 33

Index Scan using pk_judgement_result_t on judgement_result_t jrp (cost=0.28..0.30 rows=1 width=21) (actual time=0.000..0.000 rows=0 loops=33)

  • Index Cond: (id = jp.judgement_result_id)
45. 0.231 0.231 ↑ 1.0 1 33

Index Scan using pk_analysis_t on analysis_t ant (cost=0.42..0.50 rows=1 width=9) (actual time=0.006..0.007 rows=1 loops=33)

  • Index Cond: (pr.analysis_id = id)
46. 0.231 0.231 ↑ 1.0 1 33

Index Scan using geolocation__case_idx on geolocation_t g (cost=0.42..0.53 rows=1 width=16) (actual time=0.007..0.007 rows=1 loops=33)

  • Index Cond: (c.id = case_id)
47. 0.264 0.264 ↑ 1.0 1 33

Index Scan using pk_address_t on address_t a (cost=0.43..0.85 rows=1 width=42) (actual time=0.008..0.008 rows=1 loops=33)

  • Index Cond: (id = g.target_principal_address_id)
48. 0.297 0.297 ↑ 1.5 2 33

Index Scan using case_x_case_parent_idx on case_x_case_t cxc (cost=0.42..0.55 rows=3 width=16) (actual time=0.006..0.009 rows=2 loops=33)

  • Index Cond: (parent_id = c.id)
49. 0.882 0.882 ↑ 1.3 32 63

Index Scan using unit_authority_idx on unit_t u (cost=0.28..0.99 rows=41 width=24) (actual time=0.003..0.014 rows=32 loops=63)

  • Index Cond: (managing_authority_id = c.main_impacted_muni_id)
50.          

SubPlan (forNested Loop Left Join)

51. 0.567 15.813 ↑ 1.0 1 63

Nested Loop (cost=0.43..20.92 rows=1 width=16) (actual time=0.058..0.251 rows=1 loops=63)

  • Join Filter: (ref.reference_type_id = reft.id)
  • Rows Removed by Join Filter: 23
52. 1.386 1.386 ↓ 24.0 24 63

Index Scan using reference_case_idx on reference_t ref (cost=0.43..19.02 rows=1 width=24) (actual time=0.008..0.022 rows=24 loops=63)

  • Index Cond: (external_id = c.id)
  • Filter: (managing_authority_id = c.main_impacted_muni_id)
  • Rows Removed by Filter: 8
53. 13.860 13.860 ↑ 1.0 1 1,540

Seq Scan on reference_type_t reft (cost=0.00..1.89 rows=1 width=8) (actual time=0.005..0.009 rows=1 loops=1,540)

  • Filter: ((reference_type)::text = 'MUNIC'::text)
  • Rows Removed by Filter: 70
54. 0.344 4.284 ↑ 1.0 1 63

Nested Loop (cost=0.43..20.92 rows=1 width=16) (actual time=0.031..0.068 rows=1 loops=63)

  • Join Filter: (ref_1.reference_type_id = reft_1.id)
  • Rows Removed by Join Filter: 5
55. 0.756 0.756 ↓ 6.0 6 63

Index Scan using reference_case_idx on reference_t ref_1 (cost=0.43..19.02 rows=1 width=24) (actual time=0.005..0.012 rows=6 loops=63)

  • Index Cond: (external_id = c.id)
  • Filter: (managing_authority_id = 20)
  • Rows Removed by Filter: 26
56. 3.184 3.184 ↑ 1.0 1 398

Seq Scan on reference_type_t reft_1 (cost=0.00..1.89 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=398)

  • Filter: ((reference_type)::text = 'AATL'::text)
  • Rows Removed by Filter: 70
57. 0.103 1.260 ↓ 0.0 0 63

Nested Loop (cost=0.43..20.92 rows=1 width=16) (actual time=0.014..0.020 rows=0 loops=63)

  • Join Filter: (ref_2.reference_type_id = reft_2.id)
  • Rows Removed by Join Filter: 1
58. 0.693 0.693 ↑ 1.0 1 63

Index Scan using reference_case_idx on reference_t ref_2 (cost=0.43..19.02 rows=1 width=24) (actual time=0.011..0.011 rows=1 loops=63)

  • Index Cond: (external_id = c.id)
  • Filter: (managing_authority_id = 21)
  • Rows Removed by Filter: 32
59. 0.464 0.464 ↑ 1.0 1 58

Seq Scan on reference_type_t reft_2 (cost=0.00..1.89 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=58)

  • Filter: ((reference_type)::text = 'ENVIRON'::text)
  • Rows Removed by Filter: 70
60. 0.063 1.638 ↓ 0.0 0 63

Nested Loop (cost=1.70..21.52 rows=1 width=0) (actual time=0.026..0.026 rows=0 loops=63)

  • Join Filter: (ip.person_id = pn.id)
61. 0.063 1.323 ↑ 1.0 1 63

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.018..0.021 rows=1 loops=63)

62. 0.025 0.945 ↑ 1.0 1 63

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.012..0.015 rows=1 loops=63)

63. 0.504 0.504 ↓ 2.0 2 63

Index Scan using intervenor_case_idx on intervenor_t i (cost=0.43..12.04 rows=1 width=8) (actual time=0.006..0.008 rows=2 loops=63)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 3
64. 0.416 0.416 ↑ 1.0 1 104

Index Scan using pk_intervening_person_t on intervening_person_t ip (cost=0.42..8.45 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=104)

  • Index Cond: (id = i.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
65. 0.315 0.315 ↑ 1.0 1 63

Index Only Scan using pk_person_t on person_t p (cost=0.42..0.53 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=63)

  • Index Cond: (id = ip.person_id)
  • Heap Fetches: 63
66. 0.252 0.252 ↓ 0.0 0 63

Index Only Scan using pk_person_natural_t on person_natural_t pn (cost=0.42..0.47 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=63)

  • Index Cond: (id = p.id)
  • Heap Fetches: 23
67. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=78,864.27..145,772.61 rows=230,406 width=8) (never executed)

  • Hash Cond: (i_1.id = ip_1.id)
68. 0.000 0.000 ↓ 0.0 0

Seq Scan on intervenor_t i_1 (cost=0.00..61,694.68 rows=775,892 width=16) (never executed)

  • Filter: is_primary
69. 0.000 0.000 ↓ 0.0 0

Hash (cost=72,496.91..72,496.91 rows=509,389 width=8) (never executed)

70. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=50,397.87..72,496.91 rows=509,389 width=8) (never executed)

  • Hash Cond: (ip_1.person_id = p_1.id)
71. 0.000 0.000 ↓ 0.0 0

Seq Scan on intervening_person_t ip_1 (cost=0.00..16,082.77 rows=589,656 width=16) (never executed)

  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
72. 0.000 0.000 ↓ 0.0 0

Hash (cost=43,950.50..43,950.50 rows=515,789 width=16) (never executed)

73. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=16,997.25..43,950.50 rows=515,789 width=16) (never executed)

  • Hash Cond: (p_1.id = pn_1.id)
74. 0.000 0.000 ↓ 0.0 0

Seq Scan on person_t p_1 (cost=0.00..18,797.99 rows=799,299 width=8) (never executed)

75. 0.000 0.000 ↓ 0.0 0

Hash (cost=10,549.89..10,549.89 rows=515,789 width=8) (never executed)

76. 0.000 0.000 ↓ 0.0 0

Seq Scan on person_natural_t pn_1 (cost=0.00..10,549.89 rows=515,789 width=8) (never executed)

77. 0.069 0.552 ↑ 1.0 1 23

Nested Loop (cost=1.70..21.52 rows=1 width=17) (actual time=0.014..0.024 rows=1 loops=23)

78. 0.023 0.437 ↑ 1.0 1 23

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.010..0.019 rows=1 loops=23)

79. 0.068 0.368 ↑ 1.0 1 23

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.007..0.016 rows=1 loops=23)

80. 0.184 0.184 ↓ 3.0 3 23

Index Scan using intervenor_case_idx on intervenor_t i_2 (cost=0.43..12.04 rows=1 width=8) (actual time=0.002..0.008 rows=3 loops=23)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 6
81. 0.116 0.116 ↓ 0.0 0 58

Index Scan using pk_intervening_person_t on intervening_person_t ip_2 (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=58)

  • Index Cond: (id = i_2.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
82. 0.046 0.046 ↑ 1.0 1 23

Index Only Scan using pk_person_t on person_t p_2 (cost=0.42..0.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=23)

  • Index Cond: (id = ip_2.person_id)
  • Heap Fetches: 23
83. 0.046 0.046 ↑ 1.0 1 23

Index Scan using pk_person_natural_t on person_natural_t pn_2 (cost=0.42..0.47 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=23)

  • Index Cond: (id = p_2.id)
84. 0.160 0.960 ↑ 1.0 1 40

Nested Loop (cost=1.70..22.70 rows=1 width=26) (actual time=0.019..0.024 rows=1 loops=40)

85. 0.040 0.480 ↑ 1.0 1 40

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.008..0.012 rows=1 loops=40)

86. 0.044 0.360 ↑ 1.0 1 40

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.005..0.009 rows=1 loops=40)

87. 0.160 0.160 ↓ 2.0 2 40

Index Scan using intervenor_case_idx on intervenor_t i2 (cost=0.43..12.04 rows=1 width=8) (actual time=0.002..0.004 rows=2 loops=40)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 5
88. 0.156 0.156 ↑ 1.0 1 78

Index Scan using pk_intervening_person_t on intervening_person_t ip2 (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=78)

  • Index Cond: (id = i2.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
89. 0.080 0.080 ↑ 1.0 1 40

Index Only Scan using pk_person_t on person_t p2 (cost=0.42..0.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=40)

  • Index Cond: (id = ip2.person_id)
  • Heap Fetches: 40
90. 0.200 0.200 ↑ 1.0 1 40

Index Scan using pk_person_legal_t on person_legal_t pl (cost=0.42..0.47 rows=1 width=34) (actual time=0.005..0.005 rows=1 loops=40)

  • Index Cond: (id = p2.id)
91.          

SubPlan (forNested Loop)

92. 0.120 0.120 ↑ 1.0 1 40

Seq Scan on juridical_form_t jf (cost=0.00..1.19 rows=1 width=516) (actual time=0.002..0.003 rows=1 loops=40)

  • Filter: (id = pl.juridical_form_id)
  • Rows Removed by Filter: 14
93. 0.063 0.819 ↓ 0.0 0 63

Nested Loop (cost=1.70..21.52 rows=1 width=0) (actual time=0.013..0.013 rows=0 loops=63)

  • Join Filter: (ip_3.person_id = pn_3.id)
94. 0.000 0.630 ↑ 1.0 1 63

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.008..0.010 rows=1 loops=63)

95. 0.107 0.504 ↑ 1.0 1 63

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.005..0.008 rows=1 loops=63)

96. 0.189 0.189 ↓ 2.0 2 63

Index Scan using intervenor_case_idx on intervenor_t i_3 (cost=0.43..12.04 rows=1 width=8) (actual time=0.002..0.003 rows=2 loops=63)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 3
97. 0.208 0.208 ↑ 1.0 1 104

Index Scan using pk_intervening_person_t on intervening_person_t ip_3 (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=104)

  • Index Cond: (id = i_3.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
98. 0.126 0.126 ↑ 1.0 1 63

Index Only Scan using pk_person_t on person_t p_3 (cost=0.42..0.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=63)

  • Index Cond: (id = ip_3.person_id)
  • Heap Fetches: 63
99. 0.126 0.126 ↓ 0.0 0 63

Index Only Scan using pk_person_natural_t on person_natural_t pn_3 (cost=0.42..0.47 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=63)

  • Index Cond: (id = p_3.id)
  • Heap Fetches: 23
100. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=78,864.27..145,772.61 rows=230,406 width=8) (never executed)

  • Hash Cond: (i_4.id = ip_4.id)
101. 0.000 0.000 ↓ 0.0 0

Seq Scan on intervenor_t i_4 (cost=0.00..61,694.68 rows=775,892 width=16) (never executed)

  • Filter: is_primary
102. 0.000 0.000 ↓ 0.0 0

Hash (cost=72,496.91..72,496.91 rows=509,389 width=8) (never executed)

103. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=50,397.87..72,496.91 rows=509,389 width=8) (never executed)

  • Hash Cond: (ip_4.person_id = p_4.id)
104. 0.000 0.000 ↓ 0.0 0

Seq Scan on intervening_person_t ip_4 (cost=0.00..16,082.77 rows=589,656 width=16) (never executed)

  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
105. 0.000 0.000 ↓ 0.0 0

Hash (cost=43,950.50..43,950.50 rows=515,789 width=16) (never executed)

106. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=16,997.25..43,950.50 rows=515,789 width=16) (never executed)

  • Hash Cond: (p_4.id = pn_4.id)
107. 0.000 0.000 ↓ 0.0 0

Seq Scan on person_t p_4 (cost=0.00..18,797.99 rows=799,299 width=8) (never executed)

108. 0.000 0.000 ↓ 0.0 0

Hash (cost=10,549.89..10,549.89 rows=515,789 width=8) (never executed)

109. 0.000 0.000 ↓ 0.0 0

Seq Scan on person_natural_t pn_4 (cost=0.00..10,549.89 rows=515,789 width=8) (never executed)

110. 0.046 0.437 ↑ 1.0 1 23

Nested Loop (cost=1.70..21.52 rows=1 width=17) (actual time=0.013..0.019 rows=1 loops=23)

111. 0.023 0.345 ↑ 1.0 1 23

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.009..0.015 rows=1 loops=23)

112. 0.045 0.276 ↑ 1.0 1 23

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.006..0.012 rows=1 loops=23)

113. 0.115 0.115 ↓ 3.0 3 23

Index Scan using intervenor_case_idx on intervenor_t i_5 (cost=0.43..12.04 rows=1 width=8) (actual time=0.002..0.005 rows=3 loops=23)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 6
114. 0.116 0.116 ↓ 0.0 0 58

Index Scan using pk_intervening_person_t on intervening_person_t ip_5 (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=58)

  • Index Cond: (id = i_5.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
115. 0.046 0.046 ↑ 1.0 1 23

Index Only Scan using pk_person_t on person_t p_5 (cost=0.42..0.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=23)

  • Index Cond: (id = ip_5.person_id)
  • Heap Fetches: 23
116. 0.046 0.046 ↑ 1.0 1 23

Index Scan using pk_person_natural_t on person_natural_t pn_5 (cost=0.42..0.47 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=23)

  • Index Cond: (id = p_5.id)
117. 0.120 0.760 ↑ 1.0 1 40

Nested Loop (cost=1.70..22.70 rows=1 width=25) (actual time=0.014..0.019 rows=1 loops=40)

118. 0.040 0.480 ↑ 1.0 1 40

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.008..0.012 rows=1 loops=40)

119. 0.044 0.360 ↑ 1.0 1 40

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.005..0.009 rows=1 loops=40)

120. 0.160 0.160 ↓ 2.0 2 40

Index Scan using intervenor_case_idx on intervenor_t i2_1 (cost=0.43..12.04 rows=1 width=8) (actual time=0.002..0.004 rows=2 loops=40)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 5
121. 0.156 0.156 ↑ 1.0 1 78

Index Scan using pk_intervening_person_t on intervening_person_t ip2_1 (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=78)

  • Index Cond: (id = i2_1.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
122. 0.080 0.080 ↑ 1.0 1 40

Index Only Scan using pk_person_t on person_t p2_1 (cost=0.42..0.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=40)

  • Index Cond: (id = ip2_1.person_id)
  • Heap Fetches: 40
123. 0.080 0.080 ↑ 1.0 1 40

Index Scan using pk_person_legal_t on person_legal_t pl_1 (cost=0.42..0.47 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=40)

  • Index Cond: (id = p2_1.id)
124.          

SubPlan (forNested Loop)

125. 0.080 0.080 ↑ 1.0 1 40

Seq Scan on juridical_form_t jf_1 (cost=0.00..1.19 rows=1 width=516) (actual time=0.001..0.002 rows=1 loops=40)

  • Filter: (id = pl_1.juridical_form_id)
  • Rows Removed by Filter: 14
126. 0.063 1.197 ↓ 0.0 0 63

Nested Loop (cost=1.70..21.52 rows=1 width=0) (actual time=0.019..0.019 rows=0 loops=63)

  • Join Filter: (ip_6.person_id = pn_6.id)
127. 0.441 1.008 ↑ 1.0 1 63

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.014..0.016 rows=1 loops=63)

128. 0.044 0.441 ↑ 1.0 1 63

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.005..0.007 rows=1 loops=63)

129. 0.189 0.189 ↓ 2.0 2 63

Index Scan using intervenor_case_idx on intervenor_t i_6 (cost=0.43..12.04 rows=1 width=8) (actual time=0.002..0.003 rows=2 loops=63)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 3
130. 0.208 0.208 ↑ 1.0 1 104

Index Scan using pk_intervening_person_t on intervening_person_t ip_6 (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=104)

  • Index Cond: (id = i_6.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
131. 0.126 0.126 ↑ 1.0 1 63

Index Only Scan using pk_person_t on person_t p_6 (cost=0.42..0.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=63)

  • Index Cond: (id = ip_6.person_id)
  • Heap Fetches: 63
132. 0.126 0.126 ↓ 0.0 0 63

Index Only Scan using pk_person_natural_t on person_natural_t pn_6 (cost=0.42..0.47 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=63)

  • Index Cond: (id = p_6.id)
  • Heap Fetches: 23
133. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=78,864.27..145,772.61 rows=230,406 width=8) (never executed)

  • Hash Cond: (i_7.id = ip_7.id)
134. 0.000 0.000 ↓ 0.0 0

Seq Scan on intervenor_t i_7 (cost=0.00..61,694.68 rows=775,892 width=16) (never executed)

  • Filter: is_primary
135. 0.000 0.000 ↓ 0.0 0

Hash (cost=72,496.91..72,496.91 rows=509,389 width=8) (never executed)

136. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=50,397.87..72,496.91 rows=509,389 width=8) (never executed)

  • Hash Cond: (ip_7.person_id = p_7.id)
137. 0.000 0.000 ↓ 0.0 0

Seq Scan on intervening_person_t ip_7 (cost=0.00..16,082.77 rows=589,656 width=16) (never executed)

  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
138. 0.000 0.000 ↓ 0.0 0

Hash (cost=43,950.50..43,950.50 rows=515,789 width=16) (never executed)

139. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=16,997.25..43,950.50 rows=515,789 width=16) (never executed)

  • Hash Cond: (p_7.id = pn_7.id)
140. 0.000 0.000 ↓ 0.0 0

Seq Scan on person_t p_7 (cost=0.00..18,797.99 rows=799,299 width=8) (never executed)

141. 0.000 0.000 ↓ 0.0 0

Hash (cost=10,549.89..10,549.89 rows=515,789 width=8) (never executed)

142. 0.000 0.000 ↓ 0.0 0

Seq Scan on person_natural_t pn_7 (cost=0.00..10,549.89 rows=515,789 width=8) (never executed)

143. 0.023 0.414 ↑ 1.0 1 23

Nested Loop (cost=1.70..21.52 rows=1 width=17) (actual time=0.013..0.018 rows=1 loops=23)

144. 0.046 0.345 ↑ 1.0 1 23

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.009..0.015 rows=1 loops=23)

145. 0.022 0.253 ↑ 1.0 1 23

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.006..0.011 rows=1 loops=23)

146. 0.115 0.115 ↓ 3.0 3 23

Index Scan using intervenor_case_idx on intervenor_t i_8 (cost=0.43..12.04 rows=1 width=8) (actual time=0.002..0.005 rows=3 loops=23)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 6
147. 0.116 0.116 ↓ 0.0 0 58

Index Scan using pk_intervening_person_t on intervening_person_t ip_8 (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=58)

  • Index Cond: (id = i_8.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
148. 0.046 0.046 ↑ 1.0 1 23

Index Only Scan using pk_person_t on person_t p_8 (cost=0.42..0.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=23)

  • Index Cond: (id = ip_8.person_id)
  • Heap Fetches: 23
149. 0.046 0.046 ↑ 1.0 1 23

Index Scan using pk_person_natural_t on person_natural_t pn_8 (cost=0.42..0.47 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=23)

  • Index Cond: (id = p_8.id)
150. 0.120 0.720 ↑ 1.0 1 40

Nested Loop (cost=1.70..22.70 rows=1 width=25) (actual time=0.014..0.018 rows=1 loops=40)

151. 0.040 0.440 ↑ 1.0 1 40

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.007..0.011 rows=1 loops=40)

152. 0.004 0.320 ↑ 1.0 1 40

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.005..0.008 rows=1 loops=40)

153. 0.160 0.160 ↓ 2.0 2 40

Index Scan using intervenor_case_idx on intervenor_t i2_2 (cost=0.43..12.04 rows=1 width=8) (actual time=0.002..0.004 rows=2 loops=40)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 5
154. 0.156 0.156 ↑ 1.0 1 78

Index Scan using pk_intervening_person_t on intervening_person_t ip2_2 (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=78)

  • Index Cond: (id = i2_2.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
155. 0.080 0.080 ↑ 1.0 1 40

Index Only Scan using pk_person_t on person_t p2_2 (cost=0.42..0.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=40)

  • Index Cond: (id = ip2_2.person_id)
  • Heap Fetches: 40
156. 0.080 0.080 ↑ 1.0 1 40

Index Scan using pk_person_legal_t on person_legal_t pl_2 (cost=0.42..0.47 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=40)

  • Index Cond: (id = p2_2.id)
157.          

SubPlan (forNested Loop)

158. 0.080 0.080 ↑ 1.0 1 40

Seq Scan on juridical_form_t jf_2 (cost=0.00..1.19 rows=1 width=516) (actual time=0.001..0.002 rows=1 loops=40)

  • Filter: (id = pl_2.juridical_form_id)
  • Rows Removed by Filter: 14
159. 0.126 1.638 ↑ 1.0 1 63

Nested Loop Left Join (cost=1.56..26.88 rows=1 width=17) (actual time=0.023..0.026 rows=1 loops=63)

160. 0.063 1.260 ↑ 1.0 1 63

Nested Loop Left Join (cost=1.13..20.85 rows=1 width=8) (actual time=0.018..0.020 rows=1 loops=63)

161. 0.063 1.008 ↑ 1.0 1 63

Nested Loop (cost=0.85..20.54 rows=1 width=8) (actual time=0.014..0.016 rows=1 loops=63)

162. 0.441 0.441 ↓ 2.0 2 63

Index Scan using intervenor_case_idx on intervenor_t i_9 (cost=0.43..12.08 rows=1 width=8) (actual time=0.005..0.007 rows=2 loops=63)

  • Index Cond: (case_id = c.id)
  • Filter: ((((c.case_type)::text = ANY ('{URBANISM,ENVIRONMENT,ADMINISTRATIVE,SUBDIVISION,STATUTORY_PROVISIONING,GEN,PPAS}'::text[])) AND ((intervenor_role)::text = 'MANAGER_EXPERT'::text)) OR (((c.case_type)::text = ANY ('{REPORTING,INFRINGEMENT}'::text[])) AND ((intervenor_role)::text = 'INFRACTION_REPORTING_CONTROLLER_PU'::text)) OR (((c.case_type)::text = 'PEB'::text) AND ((intervenor_role)::text = 'MANAGER_PEB'::text)))
  • Rows Removed by Filter: 6
163. 0.504 0.504 ↓ 0.0 0 126

Index Scan using pk_intervening_user_t on intervening_user_t iu (cost=0.42..8.45 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=126)

  • Index Cond: (id = i_9.id)
  • Filter: (on_behalf_of_authority_id = 4)
  • Rows Removed by Filter: 0
164. 0.189 0.189 ↑ 1.0 1 63

Index Scan using pk_user_person_t on user_person_t up (cost=0.28..0.30 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=63)

  • Index Cond: (id = iu.user_id)
165. 0.252 0.252 ↑ 1.0 1 63

Index Scan using pk_person_natural_t on person_natural_t p_9 (cost=0.42..6.01 rows=1 width=25) (actual time=0.004..0.004 rows=1 loops=63)

  • Index Cond: (id = up.abstract_person_id)
166. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1.56..26.88 rows=1 width=17) (never executed)

167. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1.13..20.85 rows=1 width=8) (never executed)

168. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.85..20.54 rows=1 width=8) (never executed)

169. 0.000 0.000 ↓ 0.0 0

Index Scan using intervenor_case_idx on intervenor_t i_10 (cost=0.43..12.08 rows=1 width=8) (never executed)

  • Index Cond: (case_id = c.id)
  • Filter: ((((c.case_type)::text = ANY ('{URBANISM,ENVIRONMENT,ADMINISTRATIVE,SUBDIVISION,STATUTORY_PROVISIONING,GEN,PPAS}'::text[])) AND ((intervenor_role)::text = 'MANAGER_EXPERT'::text)) OR (((c.case_type)::text = ANY ('{REPORTING,INFRINGEMENT}'::text[])) AND ((intervenor_role)::text = 'INFRACTION_REPORTING_CONTROLLER_PU'::text)) OR (((c.case_type)::text = 'PEB'::text) AND ((intervenor_role)::text = 'MANAGER_PEB'::text)))
170. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_intervening_user_t on intervening_user_t iu_1 (cost=0.42..8.45 rows=1 width=16) (never executed)

  • Index Cond: (id = i_10.id)
  • Filter: (on_behalf_of_authority_id = c.managing_authority_id)
171. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_user_person_t on user_person_t up_1 (cost=0.28..0.30 rows=1 width=16) (never executed)

  • Index Cond: (id = iu_1.user_id)
172. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_person_natural_t on person_natural_t p_10 (cost=0.42..6.01 rows=1 width=25) (never executed)

  • Index Cond: (id = up_1.abstract_person_id)
173. 0.063 0.945 ↑ 1.0 1 63

Nested Loop (cost=1.00..17.07 rows=1 width=10) (actual time=0.014..0.015 rows=1 loops=63)

174. 0.126 0.756 ↑ 1.0 1 63

Nested Loop (cost=0.85..16.90 rows=1 width=8) (actual time=0.011..0.012 rows=1 loops=63)

175. 0.315 0.315 ↑ 1.0 1 63

Index Scan using pk_configuration_t on configuration_t ct (cost=0.42..8.44 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=63)

  • Index Cond: (c.configuration_id = id)
176. 0.315 0.315 ↑ 1.0 1 63

Index Scan using pk_phase_t on phase_t pht (cost=0.43..8.45 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=63)

  • Index Cond: (id = ct.current_phase_id)
177. 0.126 0.126 ↑ 1.0 1 63

Index Scan using pk_phase_definition_t on phase_definition_t pdt (cost=0.15..0.17 rows=1 width=18) (actual time=0.002..0.002 rows=1 loops=63)

  • Index Cond: (id = pht.definition_id)
Planning time : 557.226 ms