explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xyVn

Settings
# exclusive inclusive rows x rows loops node
1. 0.106 25,283.495 ↑ 1.0 250 1

Limit (cost=5.43..937,936.28 rows=250 width=7,138) (actual time=1,636.780..25,283.495 rows=250 loops=1)

2. 317.094 25,283.389 ↑ 26.1 250 1

Nested Loop Left Join (cost=5.43..24,483,752.23 rows=6,526 width=7,138) (actual time=1,636.780..25,283.389 rows=250 loops=1)

3. 5.916 2,688.434 ↑ 26.1 250 1

Nested Loop Left Join (cost=5.00..1,366,291.39 rows=6,526 width=2,767) (actual time=5.293..2,688.434 rows=250 loops=1)

  • Join Filter: (termdic.id = term.term_dictionary_id)
  • Rows Removed by Join Filter: 58929
4. 14.858 2,679.268 ↑ 26.1 250 1

Nested Loop Left Join (cost=5.00..1,343,181.40 rows=6,526 width=2,696) (actual time=4.902..2,679.268 rows=250 loops=1)

  • Join Filter: (term.id = tfc.term_id)
  • Rows Removed by Join Filter: 205679
5. 6.866 2,652.910 ↑ 26.1 250 1

Nested Loop (cost=5.00..1,262,596.64 rows=6,526 width=2,696) (actual time=3.260..2,652.910 rows=250 loops=1)

  • Join Filter: (pdt.id = p.definition_id)
  • Rows Removed by Join Filter: 73993
6. 0.694 2,642.044 ↑ 26.1 250 1

Nested Loop Left Join (cost=5.00..1,233,417.70 rows=6,526 width=2,694) (actual time=2.896..2,642.044 rows=250 loops=1)

7. 4.964 2,602.600 ↑ 26.1 250 1

Nested Loop Left Join (cost=4.57..1,227,623.48 rows=6,526 width=2,686) (actual time=2.893..2,602.600 rows=250 loops=1)

  • Join Filter: (c.version_id = vers.id)
  • Rows Removed by Join Filter: 46148
8. 1.416 2,594.886 ↑ 26.1 250 1

Nested Loop Left Join (cost=4.57..1,209,407.62 rows=6,526 width=2,588) (actual time=2.547..2,594.886 rows=250 loops=1)

  • Join Filter: (c.managing_authority_id = a.id)
  • Rows Removed by Join Filter: 6737
9. 0.881 2,592.470 ↑ 26.1 250 1

Nested Loop Left Join (cost=4.57..1,206,665.35 rows=6,526 width=1,548) (actual time=2.209..2,592.470 rows=250 loops=1)

10. 0.649 2,470.589 ↑ 26.1 250 1

Nested Loop Left Join (cost=4.13..1,200,534.21 rows=6,526 width=524) (actual time=2.201..2,470.589 rows=250 loops=1)

11. 0.780 2,424.690 ↑ 26.1 250 1

Nested Loop Left Join (cost=3.71..1,197,408.14 rows=6,526 width=349) (actual time=2.200..2,424.690 rows=250 loops=1)

12. 0.739 2,328.660 ↑ 26.1 250 1

Nested Loop Left Join (cost=3.29..1,194,115.21 rows=6,526 width=319) (actual time=2.196..2,328.660 rows=250 loops=1)

13. 0.421 2,321.671 ↑ 26.1 250 1

Nested Loop Left Join (cost=2.99..1,191,969.80 rows=6,526 width=295) (actual time=2.191..2,321.671 rows=250 loops=1)

14. 0.594 2,200.250 ↑ 26.1 250 1

Nested Loop Left Join (cost=2.57..1,187,929.99 rows=6,526 width=303) (actual time=2.182..2,200.250 rows=250 loops=1)

15. 0.957 2,197.906 ↑ 26.1 250 1

Nested Loop (cost=2.13..1,184,047.84 rows=6,526 width=303) (actual time=2.180..2,197.906 rows=250 loops=1)

16. 1.011 2,070.699 ↑ 26.1 250 1

Nested Loop (cost=1.71..1,180,155.90 rows=6,526 width=295) (actual time=2.173..2,070.699 rows=250 loops=1)

17. 0.840 1,957.103 ↑ 25.8 253 1

Nested Loop Left Join (cost=1.28..1,176,884.47 rows=6,526 width=287) (actual time=2.167..1,957.103 rows=253 loops=1)

18. 0.499 1,863.159 ↑ 25.8 253 1

Nested Loop (cost=0.85..1,173,712.37 rows=6,526 width=273) (actual time=2.161..1,863.159 rows=253 loops=1)

19. 0.000 1,721.348 ↑ 25.6 256 1

Nested Loop (cost=0.43..1,169,548.95 rows=6,546 width=78) (actual time=2.155..1,721.348 rows=256 loops=1)

20. 26.522 26.522 ↑ 3.9 190,340 1

Seq Scan on geolocation_t g (cost=0.00..15,049.85 rows=736,485 width=24) (actual time=0.011..26.522 rows=190,340 loops=1)

21. 1,713.060 1,713.060 ↓ 0.0 0 190,340

Index Scan using pk_address_t on address_t ad (cost=0.43..1.56 rows=1 width=70) (actual time=0.009..0.009 rows=0 loops=190,340)

  • Index Cond: (id = g.target_principal_address_id)
  • Filter: ((street_french)::text ~~ '%ble%'::text)
  • Rows Removed by Filter: 1
22. 141.312 141.312 ↑ 1.0 1 256

Index Scan using pk_case_t on case_t c (cost=0.42..0.63 rows=1 width=203) (actual time=0.547..0.552 rows=1 loops=256)

  • Index Cond: (id = g.case_id)
  • Filter: ((NOT deleted) AND (NOT a_new_version_exists))
  • Rows Removed by Filter: 0
23. 93.104 93.104 ↑ 1.0 1 253

Index Scan using case_status_board_to_case_idx on case_status_board_t board (cost=0.42..0.48 rows=1 width=22) (actual time=0.367..0.368 rows=1 loops=253)

  • Index Cond: (c.id = case_id)
24. 112.585 112.585 ↑ 1.0 1 253

Index Scan using pk_configuration_t on configuration_t config (cost=0.42..0.49 rows=1 width=16) (actual time=0.444..0.445 rows=1 loops=253)

  • Index Cond: (id = c.configuration_id)
25. 126.250 126.250 ↑ 1.0 1 250

Index Scan using pk_phase_t on phase_t p (cost=0.43..0.59 rows=1 width=24) (actual time=0.504..0.505 rows=1 loops=250)

  • Index Cond: (id = config.current_phase_id)
26. 1.750 1.750 ↓ 0.0 0 250

Index Scan using pk_deadline_acm_t on deadline_acm_t d1 (cost=0.43..0.58 rows=1 width=16) (actual time=0.007..0.007 rows=0 loops=250)

  • Index Cond: (p.deadline_id = id)
27. 121.000 121.000 ↑ 1.0 1 250

Index Scan using geolocation_localization_context_geolocation_id_idx on geolocation_localization_context_t glc (cost=0.43..0.61 rows=1 width=8) (actual time=0.474..0.484 rows=1 loops=250)

  • Index Cond: (g.id = geolocation_id)
  • Filter: ((context_type)::text = 'TARGET'::text)
  • Rows Removed by Filter: 2
28. 6.250 6.250 ↓ 0.0 0 250

Index Scan using pk_environment_permit_request_t on environment_permit_request_t eprt (cost=0.29..0.32 rows=1 width=32) (actual time=0.025..0.025 rows=0 loops=250)

  • Index Cond: (c.id = id)
29. 95.250 95.250 ↑ 1.0 1 250

Index Scan using pk_permit_request_t on permit_request_t prt (cost=0.42..0.49 rows=1 width=38) (actual time=0.381..0.381 rows=1 loops=250)

  • Index Cond: (c.id = id)
30. 45.250 45.250 ↑ 1.0 1 250

Index Scan using pk_delivery_t on delivery_t del (cost=0.42..0.47 rows=1 width=191) (actual time=0.180..0.181 rows=1 loops=250)

  • Index Cond: (prt.delivery_id = id)
31. 121.000 121.000 ↑ 1.0 1 250

Index Scan using pk_reference_t on reference_t r (cost=0.43..0.93 rows=1 width=1,040) (actual time=0.484..0.484 rows=1 loops=250)

  • Index Cond: (c.main_reference_id = id)
32. 0.666 1.000 ↑ 1.0 28 250

Materialize (cost=0.00..1.42 rows=28 width=1,040) (actual time=0.002..0.004 rows=28 loops=250)

33. 0.334 0.334 ↑ 1.0 28 1

Seq Scan on authority_t a (cost=0.00..1.28 rows=28 width=1,040) (actual time=0.327..0.334 rows=28 loops=1)

34. 2.413 2.750 ↑ 1.0 186 250

Materialize (cost=0.00..8.79 rows=186 width=106) (actual time=0.000..0.011 rows=186 loops=250)

35. 0.337 0.337 ↑ 1.0 186 1

Seq Scan on version_t vers (cost=0.00..7.86 rows=186 width=106) (actual time=0.008..0.337 rows=186 loops=1)

36. 38.750 38.750 ↓ 0.0 0 250

Index Scan using term_for_case_pk on term_for_case_t tfc (cost=0.43..0.88 rows=1 width=24) (actual time=0.155..0.155 rows=0 loops=250)

  • Index Cond: (id = board.nearest_term_date_id)
37. 3.640 4.000 ↑ 1.0 297 250

Materialize (cost=0.00..8.47 rows=298 width=18) (actual time=0.000..0.016 rows=297 loops=250)

38. 0.360 0.360 ↑ 1.0 298 1

Seq Scan on phase_definition_t pdt (cost=0.00..6.98 rows=298 width=18) (actual time=0.007..0.360 rows=298 loops=1)

39. 10.035 11.500 ↑ 1.0 823 250

Materialize (cost=0.00..23.34 rows=823 width=16) (actual time=0.000..0.046 rows=823 loops=250)

40. 1.465 1.465 ↑ 1.0 823 1

Seq Scan on term_t term (cost=0.00..19.23 rows=823 width=16) (actual time=0.006..1.465 rows=823 loops=1)

41. 2.922 3.250 ↑ 1.0 236 250

Materialize (cost=0.00..8.54 rows=236 width=87) (actual time=0.000..0.013 rows=236 loops=250)

42. 0.328 0.328 ↑ 1.0 236 1

Seq Scan on term_dictionary_t termdic (cost=0.00..7.36 rows=236 width=87) (actual time=0.007..0.328 rows=236 loops=1)

43. 42.500 42.500 ↓ 0.0 0 250

Index Scan using pk_deadline_acm_t on deadline_acm_t dacmterm (cost=0.43..0.51 rows=1 width=16) (actual time=0.170..0.170 rows=0 loops=250)

  • Index Cond: (id = tfc.deadline_id)
44.          

SubPlan (for Nested Loop Left Join)

45. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.85..24.75 rows=1 width=0) (never executed)

46. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (case_id = c.id)
  • Filter: (is_primary AND ((nature_type)::text = 'NATURAL'::text))
47. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_intervening_person_t on intervening_person_t intervp2 (cost=0.42..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = interv2.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
48. 325.945 664.710 ↓ 5.7 353,856 1

Hash Join (cost=85,543.75..110,040.60 rows=61,754 width=8) (actual time=198.101..664.710 rows=353,856 loops=1)

  • Hash Cond: (intervp2_1.id = interv2_1.id)
49. 141.999 141.999 ↑ 1.0 590,719 1

Seq Scan on intervening_person_t intervp2_1 (cost=0.00..16,130.43 rows=592,770 width=8) (actual time=0.012..141.999 rows=590,719 loops=1)

  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 118197
50. 79.753 196.766 ↓ 2.1 391,969 1

Hash (cost=82,362.57..82,362.57 rows=182,974 width=16) (actual time=196.765..196.766 rows=391,969 loops=1)

  • Buckets: 262144 (originally 262144) Batches: 4 (originally 2) Memory Usage: 6648kB
51. 82.656 117.013 ↓ 2.1 391,969 1

Bitmap Heap Scan on intervenor_t interv2_1 (cost=13,485.57..82,362.57 rows=182,974 width=16) (actual time=35.319..117.013 rows=391,969 loops=1)

  • Recheck Cond: ((nature_type)::text = 'NATURAL'::text)
  • Filter: is_primary
  • Rows Removed by Filter: 12543
  • Heap Blocks: exact=6875
52. 34.357 34.357 ↑ 1.0 404,512 1

Bitmap Index Scan on intervenor_type_idx (cost=0.00..13,439.83 rows=404,720 width=0) (actual time=34.357..34.357 rows=404,512 loops=1)

  • Index Cond: ((nature_type)::text = 'NATURAL'::text)
53. 1.872 238.056 ↑ 1.0 1 156

Nested Loop (cost=1.70..25.82 rows=1 width=32) (actual time=1.514..1.526 rows=1 loops=156)

  • Join Filter: (intervp.person_id = pnat.id)
54. 0.312 174.096 ↑ 1.0 1 156

Nested Loop (cost=1.28..25.30 rows=1 width=16) (actual time=1.109..1.116 rows=1 loops=156)

55. 0.471 116.376 ↑ 1.0 1 156

Nested Loop (cost=0.85..24.75 rows=1 width=8) (actual time=0.740..0.746 rows=1 loops=156)

56. 91.260 91.260 ↑ 1.0 1 156

Index Scan using intervenor_case_idx on intervenor_t interv (cost=0.43..16.30 rows=1 width=8) (actual time=0.581..0.585 rows=1 loops=156)

  • Index Cond: (case_id = c.id)
  • Filter: (is_primary AND ((nature_type)::text = 'NATURAL'::text))
  • Rows Removed by Filter: 1
57. 24.645 24.645 ↑ 1.0 1 159

Index Scan using pk_intervening_person_t on intervening_person_t intervp (cost=0.42..8.45 rows=1 width=16) (actual time=0.153..0.155 rows=1 loops=159)

  • Index Cond: (id = interv.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
58. 57.408 57.408 ↑ 1.0 1 156

Index Only Scan using pk_person_t on person_t pers (cost=0.42..0.54 rows=1 width=8) (actual time=0.367..0.368 rows=1 loops=156)

  • Index Cond: (id = intervp.person_id)
  • Heap Fetches: 156
59. 62.088 62.088 ↑ 1.0 1 156

Index Scan using pk_person_natural_t on person_natural_t pnat (cost=0.42..0.50 rows=1 width=25) (actual time=0.393..0.398 rows=1 loops=156)

  • Index Cond: (id = pers.id)
60. 1.594 161.492 ↑ 1.0 1 94

Nested Loop (cost=1.70..26.98 rows=1 width=32) (actual time=1.680..1.718 rows=1 loops=94)

  • Join Filter: (intervp_1.person_id = pleg.id)
61. 0.254 125.584 ↑ 1.0 1 94

Nested Loop (cost=1.28..25.30 rows=1 width=16) (actual time=1.299..1.336 rows=1 loops=94)

62. 0.290 91.274 ↑ 1.0 1 94

Nested Loop (cost=0.85..24.75 rows=1 width=8) (actual time=0.934..0.971 rows=1 loops=94)

63. 70.688 70.688 ↑ 1.0 1 94

Index Scan using intervenor_case_idx on intervenor_t interv_1 (cost=0.43..16.30 rows=1 width=8) (actual time=0.716..0.752 rows=1 loops=94)

  • Index Cond: (case_id = c.id)
  • Filter: (is_primary AND ((nature_type)::text = 'LEGAL'::text))
  • Rows Removed by Filter: 1
64. 20.296 20.296 ↑ 1.0 1 86

Index Scan using pk_intervening_person_t on intervening_person_t intervp_1 (cost=0.42..8.45 rows=1 width=16) (actual time=0.236..0.236 rows=1 loops=86)

  • Index Cond: (id = interv_1.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
65. 34.056 34.056 ↑ 1.0 1 86

Index Only Scan using pk_person_t on person_t pers_1 (cost=0.42..0.54 rows=1 width=8) (actual time=0.395..0.396 rows=1 loops=86)

  • Index Cond: (id = intervp_1.person_id)
  • Heap Fetches: 86
66. 33.970 33.970 ↑ 1.0 1 86

Index Scan using pk_person_legal_t on person_legal_t pleg (cost=0.42..0.47 rows=1 width=532) (actual time=0.395..0.395 rows=1 loops=86)

  • Index Cond: (id = pers_1.id)
67.          

SubPlan (for Nested Loop)

68. 0.344 0.344 ↓ 0.0 0 86

Seq Scan on juridical_form_t (cost=0.00..1.19 rows=1 width=516) (actual time=0.004..0.004 rows=0 loops=86)

  • Filter: (id = pleg.juridical_form_id)
  • Rows Removed by Filter: 15
69. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.85..24.75 rows=1 width=0) (never executed)

70. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (case_id = c.id)
  • Filter: (is_primary AND ((nature_type)::text = 'NATURAL'::text))
71. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_intervening_person_t on intervening_person_t intervp2_2 (cost=0.42..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = interv2_2.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
72. 312.288 638.821 ↓ 5.7 353,856 1

Hash Join (cost=85,543.75..110,040.60 rows=61,754 width=8) (actual time=189.686..638.821 rows=353,856 loops=1)

  • Hash Cond: (intervp2_3.id = interv2_3.id)
73. 138.074 138.074 ↑ 1.0 590,719 1

Seq Scan on intervening_person_t intervp2_3 (cost=0.00..16,130.43 rows=592,770 width=8) (actual time=0.008..138.074 rows=590,719 loops=1)

  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 118197
74. 78.972 188.459 ↓ 2.1 391,969 1

Hash (cost=82,362.57..82,362.57 rows=182,974 width=16) (actual time=188.459..188.459 rows=391,969 loops=1)

  • Buckets: 262144 (originally 262144) Batches: 4 (originally 2) Memory Usage: 6648kB
75. 73.067 109.487 ↓ 2.1 391,969 1

Bitmap Heap Scan on intervenor_t interv2_3 (cost=13,485.57..82,362.57 rows=182,974 width=16) (actual time=37.401..109.487 rows=391,969 loops=1)

  • Recheck Cond: ((nature_type)::text = 'NATURAL'::text)
  • Filter: is_primary
  • Rows Removed by Filter: 12543
  • Heap Blocks: exact=6875
76. 36.420 36.420 ↑ 1.0 404,512 1

Bitmap Index Scan on intervenor_type_idx (cost=0.00..13,439.83 rows=404,720 width=0) (actual time=36.420..36.420 rows=404,512 loops=1)

  • Index Cond: ((nature_type)::text = 'NATURAL'::text)
77. 0.624 4.212 ↑ 1.0 1 156

Nested Loop (cost=1.70..25.82 rows=1 width=32) (actual time=0.026..0.027 rows=1 loops=156)

  • Join Filter: (intervp_2.person_id = pnat_1.id)
78. 0.312 3.120 ↑ 1.0 1 156

Nested Loop (cost=1.28..25.30 rows=1 width=16) (actual time=0.018..0.020 rows=1 loops=156)

79. 0.300 2.184 ↑ 1.0 1 156

Nested Loop (cost=0.85..24.75 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=156)

80. 1.248 1.248 ↑ 1.0 1 156

Index Scan using intervenor_case_idx on intervenor_t interv_2 (cost=0.43..16.30 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=156)

  • Index Cond: (case_id = c.id)
  • Filter: (is_primary AND ((nature_type)::text = 'NATURAL'::text))
  • Rows Removed by Filter: 1
81. 0.636 0.636 ↑ 1.0 1 159

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

  • Index Cond: (id = interv_2.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 0
82. 0.624 0.624 ↑ 1.0 1 156

Index Only Scan using pk_person_t on person_t pers_2 (cost=0.42..0.54 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=156)

  • Index Cond: (id = intervp_2.person_id)
  • Heap Fetches: 156
83. 0.468 0.468 ↑ 1.0 1 156

Index Scan using pk_person_natural_t on person_natural_t pnat_1 (cost=0.42..0.50 rows=1 width=25) (actual time=0.003..0.003 rows=1 loops=156)

  • Index Cond: (id = pers_2.id)
84. 0.612 2.820 ↑ 1.0 1 94

Nested Loop (cost=1.70..26.98 rows=1 width=32) (actual time=0.028..0.030 rows=1 loops=94)

  • Join Filter: (intervp_3.person_id = pleg_1.id)
85. 0.126 1.692 ↑ 1.0 1 94

Nested Loop (cost=1.28..25.30 rows=1 width=16) (actual time=0.017..0.018 rows=1 loops=94)

86. 0.126 1.222 ↑ 1.0 1 94

Nested Loop (cost=0.85..24.75 rows=1 width=8) (actual time=0.013..0.013 rows=1 loops=94)

87. 0.752 0.752 ↑ 1.0 1 94

Index Scan using intervenor_case_idx on intervenor_t interv_3 (cost=0.43..16.30 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=94)

  • Index Cond: (case_id = c.id)
  • Filter: (is_primary AND ((nature_type)::text = 'LEGAL'::text))
  • Rows Removed by Filter: 1
88. 0.344 0.344 ↑ 1.0 1 86

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

  • Index Cond: (id = interv_3.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
89. 0.344 0.344 ↑ 1.0 1 86

Index Only Scan using pk_person_t on person_t pers_3 (cost=0.42..0.54 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=86)

  • Index Cond: (id = intervp_3.person_id)
  • Heap Fetches: 86
90. 0.258 0.258 ↑ 1.0 1 86

Index Scan using pk_person_legal_t on person_legal_t pleg_1 (cost=0.42..0.47 rows=1 width=532) (actual time=0.003..0.003 rows=1 loops=86)

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

SubPlan (for Nested Loop)

92. 0.258 0.258 ↓ 0.0 0 86

Seq Scan on juridical_form_t juridical_form_t_1 (cost=0.00..1.19 rows=1 width=516) (actual time=0.003..0.003 rows=0 loops=86)

  • Filter: (id = pleg_1.juridical_form_id)
  • Rows Removed by Filter: 15
93. 0.297 88.750 ↓ 0.0 0 250

Nested Loop Left Join (cost=1.56..31.98 rows=1 width=32) (actual time=0.353..0.355 rows=0 loops=250)

94. 0.448 86.500 ↓ 0.0 0 250

Nested Loop Left Join (cost=1.13..25.12 rows=1 width=8) (actual time=0.344..0.346 rows=0 loops=250)

95. 0.249 84.750 ↓ 0.0 0 250

Nested Loop (cost=0.85..24.81 rows=1 width=8) (actual time=0.337..0.339 rows=0 loops=250)

96. 2.000 2.000 ↑ 1.0 1 250

Index Scan using intervenor_case_idx on intervenor_t i (cost=0.43..16.36 rows=1 width=8) (actual time=0.005..0.008 rows=1 loops=250)

  • Index Cond: (case_id = c.id)
  • Filter: ((((c.case_type)::text = ANY ('{URBANISM,GENERIC,ENVIRONMENT,ADMINISTRATIVE,SUBDIVISION,STATUTORY_PROVISIONING,GEN,PPAS,PAD}'::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: 1
97. 82.501 82.501 ↓ 0.0 0 211

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

  • Index Cond: (id = i.id)
  • Filter: (on_behalf_of_authority_id = c.managing_authority_id)
  • Rows Removed by Filter: 1
98. 1.302 1.302 ↑ 1.0 1 93

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

  • Index Cond: (id = iu.user_id)
99. 1.953 1.953 ↑ 1.0 1 93

Index Scan using pk_person_natural_t on person_natural_t p_1 (cost=0.42..6.84 rows=1 width=25) (actual time=0.021..0.021 rows=1 loops=93)

  • Index Cond: (id = up.abstract_person_id)
100. 1.500 845.000 ↓ 0.0 0 250

Limit (cost=415.33..419.35 rows=1 width=516) (actual time=3.379..3.380 rows=0 loops=250)

101. 1.000 843.500 ↓ 0.0 0 250

Bitmap Heap Scan on reference_t ref_muni (cost=415.33..419.35 rows=1 width=516) (actual time=3.374..3.374 rows=0 loops=250)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 38) AND (managing_authority_id = c.main_impacted_muni_id))
  • Heap Blocks: exact=100
102. 1.450 842.500 ↓ 0.0 0 250

BitmapAnd (cost=415.33..415.33 rows=1 width=0) (actual time=3.370..3.370 rows=0 loops=250)

103. 60.250 60.250 ↓ 0.0 0 250

Bitmap Index Scan on reference_case_idx (cost=0.00..5.53 rows=110 width=0) (actual time=0.241..0.241 rows=0 loops=250)

  • Index Cond: ((external_id = c.id) AND (reference_type_id = 38))
104. 780.800 780.800 ↓ 5.0 110,577 100

Bitmap Index Scan on reference_managing_authority_idx (cost=0.00..409.54 rows=22,015 width=0) (actual time=7.808..7.808 rows=110,577 loops=100)

  • Index Cond: (managing_authority_id = c.main_impacted_muni_id)
105. 1.500 9,381.250 ↑ 1.0 1 250

Limit (cost=415.33..419.35 rows=1 width=516) (actual time=37.524..37.525 rows=1 loops=250)

106. 8.000 9,379.750 ↑ 1.0 1 250

Bitmap Heap Scan on reference_t ref_region (cost=415.33..419.35 rows=1 width=516) (actual time=37.519..37.519 rows=1 loops=250)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 1) AND (managing_authority_id = 20))
  • Heap Blocks: exact=156
107. 2.200 9,371.750 ↓ 0.0 0 250

BitmapAnd (cost=415.33..415.33 rows=1 width=0) (actual time=37.487..37.487 rows=0 loops=250)

108. 1.750 1.750 ↑ 110.0 1 250

Bitmap Index Scan on reference_case_idx (cost=0.00..5.53 rows=110 width=0) (actual time=0.007..0.007 rows=1 loops=250)

  • Index Cond: ((external_id = c.id) AND (reference_type_id = 1))
109. 9,367.800 9,367.800 ↓ 42.7 940,281 156

Bitmap Index Scan on reference_managing_authority_idx (cost=0.00..409.54 rows=22,015 width=0) (actual time=60.050..60.050 rows=940,281 loops=156)

  • Index Cond: (managing_authority_id = 20)
110. 1.500 49.000 ↓ 0.0 0 250

Limit (cost=415.33..419.35 rows=1 width=516) (actual time=0.196..0.196 rows=0 loops=250)

111. 0.500 47.500 ↓ 0.0 0 250

Bitmap Heap Scan on reference_t ref_ibge (cost=415.33..419.35 rows=1 width=516) (actual time=0.190..0.190 rows=0 loops=250)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 28) AND (managing_authority_id = 21))
  • Heap Blocks: exact=2
112. 0.038 47.000 ↓ 0.0 0 250

BitmapAnd (cost=415.33..415.33 rows=1 width=0) (actual time=0.188..0.188 rows=0 loops=250)

113. 1.750 1.750 ↓ 0.0 0 250

Bitmap Index Scan on reference_case_idx (cost=0.00..5.53 rows=110 width=0) (actual time=0.007..0.007 rows=0 loops=250)

  • Index Cond: ((external_id = c.id) AND (reference_type_id = 28))
114. 45.212 45.212 ↓ 15.6 343,103 2

Bitmap Index Scan on reference_managing_authority_idx (cost=0.00..409.54 rows=22,015 width=0) (actual time=22.606..22.606 rows=343,103 loops=2)

  • Index Cond: (managing_authority_id = 21)
115. 0.500 1.250 ↓ 0.0 0 250

Limit (cost=415.33..419.35 rows=1 width=516) (actual time=0.005..0.005 rows=0 loops=250)

116. 0.250 0.750 ↓ 0.0 0 250

Bitmap Heap Scan on reference_t ref_spec (cost=415.33..419.35 rows=1 width=516) (actual time=0.003..0.003 rows=0 loops=250)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 50) AND (managing_authority_id = 20))
117. 0.000 0.500 ↓ 0.0 0 250

BitmapAnd (cost=415.33..415.33 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=250)

118. 0.500 0.500 ↓ 0.0 0 250

Bitmap Index Scan on reference_case_idx (cost=0.00..5.53 rows=110 width=0) (actual time=0.002..0.002 rows=0 loops=250)

  • Index Cond: ((external_id = c.id) AND (reference_type_id = 50))
119. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on reference_managing_authority_idx (cost=0.00..409.54 rows=22,015 width=0) (never executed)

  • Index Cond: (managing_authority_id = 20)
120. 0.250 747.500 ↓ 0.0 0 250

Limit (cost=415.33..419.35 rows=1 width=516) (actual time=2.990..2.990 rows=0 loops=250)

121. 0.750 747.250 ↓ 0.0 0 250

Bitmap Heap Scan on reference_t ref_muni_1 (cost=415.33..419.35 rows=1 width=516) (actual time=2.989..2.989 rows=0 loops=250)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 38) AND (managing_authority_id = c.main_impacted_muni_id))
  • Heap Blocks: exact=100
122. 1.000 746.500 ↓ 0.0 0 250

BitmapAnd (cost=415.33..415.33 rows=1 width=0) (actual time=2.986..2.986 rows=0 loops=250)

123. 0.500 0.500 ↓ 0.0 0 250

Bitmap Index Scan on reference_case_idx (cost=0.00..5.53 rows=110 width=0) (actual time=0.002..0.002 rows=0 loops=250)

  • Index Cond: ((external_id = c.id) AND (reference_type_id = 38))
124. 745.000 745.000 ↓ 5.0 110,577 100

Bitmap Index Scan on reference_managing_authority_idx (cost=0.00..409.54 rows=22,015 width=0) (actual time=7.450..7.450 rows=110,577 loops=100)

  • Index Cond: (managing_authority_id = c.main_impacted_muni_id)
125. 1.250 9,365.500 ↑ 1.0 1 250

Limit (cost=415.33..419.35 rows=1 width=516) (actual time=37.461..37.462 rows=1 loops=250)

126. 1.000 9,364.250 ↑ 1.0 1 250

Bitmap Heap Scan on reference_t ref_region_1 (cost=415.33..419.35 rows=1 width=516) (actual time=37.457..37.457 rows=1 loops=250)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 1) AND (managing_authority_id = 20))
  • Heap Blocks: exact=156
127. 2.250 9,363.250 ↓ 0.0 0 250

BitmapAnd (cost=415.33..415.33 rows=1 width=0) (actual time=37.453..37.453 rows=0 loops=250)

128. 1.000 1.000 ↑ 110.0 1 250

Bitmap Index Scan on reference_case_idx (cost=0.00..5.53 rows=110 width=0) (actual time=0.004..0.004 rows=1 loops=250)

  • Index Cond: ((external_id = c.id) AND (reference_type_id = 1))
129. 9,360.000 9,360.000 ↓ 42.7 940,281 156

Bitmap Index Scan on reference_managing_authority_idx (cost=0.00..409.54 rows=22,015 width=0) (actual time=60.000..60.000 rows=940,281 loops=156)

  • Index Cond: (managing_authority_id = 20)
130. 1.250 45.750 ↓ 0.0 0 250

Limit (cost=415.33..419.35 rows=1 width=516) (actual time=0.183..0.183 rows=0 loops=250)

131. 0.500 44.500 ↓ 0.0 0 250

Bitmap Heap Scan on reference_t ref_ibge_1 (cost=415.33..419.35 rows=1 width=516) (actual time=0.178..0.178 rows=0 loops=250)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 28) AND (managing_authority_id = 21))
  • Heap Blocks: exact=2
132. 0.000 44.000 ↓ 0.0 0 250

BitmapAnd (cost=415.33..415.33 rows=1 width=0) (actual time=0.176..0.176 rows=0 loops=250)

133. 1.750 1.750 ↓ 0.0 0 250

Bitmap Index Scan on reference_case_idx (cost=0.00..5.53 rows=110 width=0) (actual time=0.007..0.007 rows=0 loops=250)

  • Index Cond: ((external_id = c.id) AND (reference_type_id = 28))
134. 42.272 42.272 ↓ 15.6 343,103 2

Bitmap Index Scan on reference_managing_authority_idx (cost=0.00..409.54 rows=22,015 width=0) (actual time=21.136..21.136 rows=343,103 loops=2)

  • Index Cond: (managing_authority_id = 21)
135. 0.500 1.250 ↓ 0.0 0 250

Limit (cost=415.33..419.35 rows=1 width=516) (actual time=0.005..0.005 rows=0 loops=250)

136. 0.250 0.750 ↓ 0.0 0 250

Bitmap Heap Scan on reference_t ref_spec_1 (cost=415.33..419.35 rows=1 width=516) (actual time=0.003..0.003 rows=0 loops=250)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 50) AND (managing_authority_id = 20))
137. 0.000 0.500 ↓ 0.0 0 250

BitmapAnd (cost=415.33..415.33 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=250)

138. 0.500 0.500 ↓ 0.0 0 250

Bitmap Index Scan on reference_case_idx (cost=0.00..5.53 rows=110 width=0) (actual time=0.002..0.002 rows=0 loops=250)

  • Index Cond: ((external_id = c.id) AND (reference_type_id = 50))
139. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on reference_managing_authority_idx (cost=0.00..409.54 rows=22,015 width=0) (never executed)

  • Index Cond: (managing_authority_id = 20)