explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ngih

Settings
# exclusive inclusive rows x rows loops node
1. 1.193 1,546.883 ↓ 15.8 63 1

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

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

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

3. 0.039 1,512.304 ↓ 33.0 33 1

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

4. 0.051 1,511.935 ↓ 33.0 33 1

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

5. 0.066 1,511.620 ↓ 33.0 33 1

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

6. 0.033 1,511.290 ↓ 33.0 33 1

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

7. 0.050 1,511.224 ↓ 33.0 33 1

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

8. 0.036 1,511.174 ↓ 33.0 33 1

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

9. 0.063 1,510.973 ↓ 33.0 33 1

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

10. 0.075 1,510.646 ↓ 33.0 33 1

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

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

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

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

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

13. 0.047 1,509.453 ↓ 33.0 33 1

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

14. 0.067 1,509.373 ↓ 33.0 33 1

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

15. 17.147 1,509.240 ↓ 33.0 33 1

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

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

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

17. 182.089 1,364.069 ↓ 74.2 113,691 1

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

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

Hash Left Join (cost=6,923.55..165,388.24 rows=1,533 width=149) (actual time=166.878..1,181.980 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. 128.359 433.135 ↓ 13.1 118,622 1

Hash Left Join (cost=6,619.65..14,025.52 rows=9,059 width=283) (actual time=158.870..433.135 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. 111.715 150.137 ↑ 1.0 114,287 1

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

  • Hash Cond: (top.meeting_id = ccmeeting.id)
21. 34.832 34.832 ↑ 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.008..34.832 rows=114,287 loops=1)

22. 1.796 3.590 ↑ 1.0 9,402 1

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

  • Buckets: 16384 Batches: 1 Memory Usage: 569kB
23. 1.794 1.794 ↑ 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.005..1.794 rows=9,402 loops=1)

24. 42.250 154.639 ↑ 1.0 73,317 1

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

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

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

  • Hash Cond: (pinq.inquiry_id = inq.id)
26. 10.294 10.294 ↑ 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..10.294 rows=73,317 loops=1)

27. 27.807 49.680 ↑ 1.0 73,200 1

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

  • Buckets: 131072 Batches: 1 Memory Usage: 15868kB
28. 21.873 21.873 ↑ 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.023..21.873 rows=73,200 loops=1)

29. 4.265 7.847 ↑ 1.0 9,535 1

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

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

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

31.          

SubPlan (forHash Left Join)

32. 71.472 571.776 ↑ 1.0 1 71,472

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

33. 49.221 500.304 ↑ 1.0 1 71,472

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

34. 214.416 214.416 ↑ 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.003..0.003 rows=1 loops=71,472)

  • Index Cond: (request_id = top.permit_request_id)
35. 236.667 236.667 ↑ 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.003..0.003 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.066 0.066 ↓ 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.002..0.002 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.330 0.330 ↑ 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.010..0.010 rows=1 loops=33)

  • Index Cond: (id = mt.permit_request_id)
39. 0.297 0.297 ↑ 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.008..0.009 rows=1 loops=33)

  • Index Cond: (id = c.id)
40. 0.363 0.363 ↑ 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.010..0.011 rows=1 loops=33)

  • Index Cond: ((case_id = c.id) AND (authority_abstract_id = 4))
  • Heap Fetches: 33
41. 0.264 0.264 ↑ 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.008..0.008 rows=1 loops=33)

  • Index Cond: (id = mt.given_judgement_id)
42. 0.165 0.165 ↑ 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.005 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.033 0.033 ↓ 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.001..0.001 rows=0 loops=33)

  • Index Cond: (id = jp.judgement_result_id)
45. 0.264 0.264 ↑ 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.008..0.008 rows=1 loops=33)

  • Index Cond: (pr.analysis_id = id)
46. 0.264 0.264 ↑ 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.008..0.008 rows=1 loops=33)

  • Index Cond: (c.id = case_id)
47. 0.330 0.330 ↑ 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.009..0.010 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.007..0.009 rows=2 loops=33)

  • Index Cond: (parent_id = c.id)
49. 1.008 1.008 ↑ 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.004..0.016 rows=32 loops=63)

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

SubPlan (forNested Loop Left Join)

51. 0.189 15.498 ↑ 1.0 1 63

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

  • Join Filter: (ref.reference_type_id = reft.id)
  • Rows Removed by Join Filter: 23
52. 1.449 1.449 ↓ 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.009..0.023 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.072 4.473 ↑ 1.0 1 63

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

  • Join Filter: (ref_1.reference_type_id = reft_1.id)
  • Rows Removed by Join Filter: 5
55. 0.819 0.819 ↓ 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.013 rows=6 loops=63)

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

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

  • Filter: ((reference_type)::text = 'AATL'::text)
  • Rows Removed by Filter: 70
57. 0.045 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.522 0.522 ↑ 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.009 rows=1 loops=58)

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

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

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

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

62. 0.151 1.071 ↑ 1.0 1 63

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.013..0.017 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.378 0.378 ↑ 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.006..0.006 rows=1 loops=63)

  • Index Cond: (id = ip.person_id)
  • Heap Fetches: 63
66. 0.315 0.315 ↓ 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.005..0.005 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.575 ↑ 1.0 1 23

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

78. 0.046 0.460 ↑ 1.0 1 23

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

79. 0.045 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.207 0.207 ↓ 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.003..0.009 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.200 1.040 ↑ 1.0 1 40

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

85. 0.040 0.520 ↑ 1.0 1 40

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

86. 0.084 0.400 ↑ 1.0 1 40

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.006..0.010 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.126 0.945 ↓ 0.0 0 63

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

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

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

95. 0.044 0.504 ↑ 1.0 1 63

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

96. 0.252 0.252 ↓ 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.004 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.460 ↑ 1.0 1 23

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

111. 0.046 0.368 ↑ 1.0 1 23

Nested Loop (cost=1.28..21.04 rows=1 width=16) (actual time=0.010..0.016 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.007..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.015..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.002..0.002 rows=1 loops=40)

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

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

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

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

128. 0.107 0.504 ↑ 1.0 1 63

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.006..0.008 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.046 0.460 ↑ 1.0 1 23

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

144. 0.046 0.368 ↑ 1.0 1 23

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

145. 0.045 0.276 ↑ 1.0 1 23

Nested Loop (cost=0.85..20.49 rows=1 width=8) (actual time=0.007..0.012 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.003..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.160 0.800 ↑ 1.0 1 40

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

151. 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)

152. 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)

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.002..0.002 rows=1 loops=40)

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

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

160. 0.126 1.449 ↑ 1.0 1 63

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

161. 0.063 1.134 ↑ 1.0 1 63

Nested Loop (cost=0.85..20.54 rows=1 width=8) (actual time=0.016..0.018 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.630 0.630 ↓ 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.005..0.005 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.126 1.134 ↑ 1.0 1 63

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

174. 0.126 0.882 ↑ 1.0 1 63

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

175. 0.378 0.378 ↑ 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.006..0.006 rows=1 loops=63)

  • Index Cond: (c.configuration_id = id)
176. 0.378 0.378 ↑ 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.006..0.006 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 : 648.451 ms