explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C7Kf

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 2,271.381 ↑ 1.0 25 1

Limit (cost=7.00..11,145.10 rows=25 width=1,850) (actual time=2,176.305..2,271.381 rows=25 loops=1)

2. 458.521 2,271.376 ↑ 4,946.6 25 1

Nested Loop (cost=7.00..55,095,744.46 rows=123,665 width=1,850) (actual time=2,176.303..2,271.376 rows=25 loops=1)

3. 0.025 96.025 ↑ 4,946.6 25 1

Nested Loop Left Join (cost=7.00..11,900,365.45 rows=123,665 width=1,815) (actual time=5.801..96.025 rows=25 loops=1)

4. 0.044 95.925 ↑ 4,946.6 25 1

Nested Loop Left Join (cost=6.56..11,836,285.93 rows=123,665 width=1,815) (actual time=5.800..95.925 rows=25 loops=1)

5. 0.028 95.856 ↑ 4,946.6 25 1

Nested Loop Left Join (cost=6.42..11,810,746.40 rows=123,665 width=1,744) (actual time=5.797..95.856 rows=25 loops=1)

6. 0.036 95.778 ↑ 4,946.6 25 1

Nested Loop Left Join (cost=6.14..11,773,335.91 rows=123,665 width=1,744) (actual time=5.795..95.778 rows=25 loops=1)

7. 0.044 95.667 ↑ 4,946.6 25 1

Nested Loop Left Join (cost=5.71..11,663,550.13 rows=123,665 width=1,736) (actual time=5.792..95.667 rows=25 loops=1)

8. 0.108 95.548 ↑ 4,946.6 25 1

Nested Loop Left Join (cost=5.57..11,642,195.82 rows=123,665 width=1,638) (actual time=5.785..95.548 rows=25 loops=1)

  • Join Filter: (c.managing_authority_id = a.id)
  • Rows Removed by Join Filter: 675
9. 0.037 95.365 ↑ 4,946.6 25 1

Nested Loop Left Join (cost=5.57..11,590,255.17 rows=123,665 width=598) (actual time=5.764..95.365 rows=25 loops=1)

10. 0.036 95.203 ↑ 4,946.6 25 1

Nested Loop (cost=5.13..11,243,338.91 rows=123,665 width=565) (actual time=5.754..95.203 rows=25 loops=1)

11. 0.030 95.092 ↑ 4,946.6 25 1

Nested Loop (cost=4.99..11,221,695.95 rows=123,665 width=563) (actual time=5.746..95.092 rows=25 loops=1)

12. 0.032 94.862 ↑ 5,764.7 25 1

Nested Loop Left Join (cost=4.56..11,070,699.69 rows=144,117 width=523) (actual time=5.731..94.862 rows=25 loops=1)

13. 0.033 94.730 ↑ 5,764.7 25 1

Nested Loop Left Join (cost=4.13..11,001,664.45 rows=144,117 width=348) (actual time=5.729..94.730 rows=25 loops=1)

14. 0.017 94.547 ↑ 5,764.7 25 1

Nested Loop Left Join (cost=3.71..10,899,070.50 rows=144,117 width=318) (actual time=5.720..94.547 rows=25 loops=1)

15. 0.035 94.455 ↑ 5,764.7 25 1

Nested Loop Left Join (cost=3.42..10,846,676.91 rows=144,117 width=294) (actual time=5.711..94.455 rows=25 loops=1)

16. 0.028 94.270 ↑ 5,764.7 25 1

Nested Loop Left Join (cost=2.99..10,757,391.81 rows=144,117 width=302) (actual time=5.692..94.270 rows=25 loops=1)

17. 0.029 94.092 ↑ 5,764.7 25 1

Nested Loop Left Join (cost=2.56..10,623,127.30 rows=144,117 width=249) (actual time=5.675..94.092 rows=25 loops=1)

18. 0.032 93.938 ↑ 5,764.7 25 1

Nested Loop Left Join (cost=2.13..10,527,758.66 rows=144,117 width=233) (actual time=5.665..93.938 rows=25 loops=1)

19. 0.045 93.906 ↑ 5,764.7 25 1

Nested Loop (cost=1.70..10,442,057.76 rows=144,117 width=233) (actual time=5.663..93.906 rows=25 loops=1)

20. 0.030 93.736 ↑ 5,764.7 25 1

Nested Loop Left Join (cost=1.27..10,356,114.19 rows=144,117 width=225) (actual time=5.654..93.736 rows=25 loops=1)

21. 0.058 93.581 ↑ 5,764.7 25 1

Nested Loop (cost=0.85..10,266,808.33 rows=144,117 width=211) (actual time=5.645..93.581 rows=25 loops=1)

22. 90.718 93.398 ↑ 6,267.9 25 1

Index Scan using case_unique_business_id_idx on case_t c (cost=0.42..10,157,854.93 rows=156,697 width=203) (actual time=5.634..93.398 rows=25 loops=1)

  • Index Cond: ((case_type)::text = 'URBANISM'::text)
  • Filter: ((NOT a_new_version_exists) AND ((reception_date IS NULL) OR ((reception_date > '2010-01-01 00:00:00'::timestamp without time zone) AND (reception_date < '2020-01-10 00:00:00'::timestamp without time zone))) AND (upper(((SubPlan 20))::text) ~~ '%P%'::text))
  • Rows Removed by Filter: 168687
23.          

SubPlan (for Index Scan)

24. 0.536 2.680 ↑ 1.0 1 536

Limit (cost=0.43..22.62 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=536)

25. 2.144 2.144 ↑ 1.0 1 536

Index Scan using reference_case_idx on reference_t ref_region_2 (cost=0.43..22.62 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=536)

  • Index Cond: (external_id = c.id)
  • Filter: ((managing_authority_id = 20) AND (reference_type_id = 1))
  • Rows Removed by Filter: 2
26. 0.125 0.125 ↑ 1.0 1 25

Index Scan using pk_configuration_t on configuration_t config (cost=0.42..0.69 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=25)

  • Index Cond: (id = c.configuration_id)
27. 0.125 0.125 ↑ 1.0 1 25

Index Scan using case_status_board_to_case_idx on case_status_board_t board (cost=0.42..0.61 rows=1 width=22) (actual time=0.005..0.005 rows=1 loops=25)

  • Index Cond: (c.id = case_id)
28. 0.125 0.125 ↑ 1.0 1 25

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

  • Index Cond: (id = config.current_phase_id)
29. 0.000 0.000 ↓ 0.0 0 25

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

  • Index Cond: (p.deadline_id = id)
30. 0.125 0.125 ↑ 1.0 1 25

Index Scan using geolocation__case_idx on geolocation_t g (cost=0.42..0.65 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=25)

  • Index Cond: (case_id = c.id)
31. 0.150 0.150 ↑ 1.0 1 25

Index Scan using pk_address_t on address_t ad (cost=0.43..0.92 rows=1 width=69) (actual time=0.005..0.006 rows=1 loops=25)

  • Index Cond: (id = g.target_principal_address_id)
32. 0.150 0.150 ↓ 0.0 0 25

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.006..0.006 rows=0 loops=25)

  • Index Cond: (g.id = geolocation_id)
  • Filter: ((context_type)::text = 'TARGET'::text)
  • Rows Removed by Filter: 1
33. 0.075 0.075 ↓ 0.0 0 25

Index Scan using pk_environment_permit_request_t on environment_permit_request_t eprt (cost=0.29..0.35 rows=1 width=32) (actual time=0.003..0.003 rows=0 loops=25)

  • Index Cond: (c.id = id)
34. 0.150 0.150 ↑ 1.0 1 25

Index Scan using pk_permit_request_t on permit_request_t prt (cost=0.42..0.70 rows=1 width=38) (actual time=0.005..0.006 rows=1 loops=25)

  • Index Cond: (c.id = id)
35. 0.100 0.100 ↑ 1.0 1 25

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

  • Index Cond: (prt.delivery_id = id)
36. 0.200 0.200 ↑ 1.0 1 25

Index Scan using case_actor_authority_case_idx on case_actor_authority_t actors1_ (cost=0.43..1.04 rows=1 width=40) (actual time=0.007..0.008 rows=1 loops=25)

  • Index Cond: (case_id = c.id)
  • Filter: (authority_abstract_id = 20)
  • Rows Removed by Filter: 2
37. 0.075 0.075 ↑ 1.0 1 25

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.003 rows=1 loops=25)

  • Index Cond: (id = p.definition_id)
38. 0.125 0.125 ↑ 1.0 1 25

Index Scan using pk_reference_t on reference_t r (cost=0.43..2.80 rows=1 width=49) (actual time=0.005..0.005 rows=1 loops=25)

  • Index Cond: (c.main_reference_id = id)
39. 0.067 0.075 ↑ 1.0 28 25

Materialize (cost=0.00..1.42 rows=28 width=1,040) (actual time=0.001..0.003 rows=28 loops=25)

40. 0.008 0.008 ↑ 1.0 28 1

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

41. 0.075 0.075 ↑ 1.0 1 25

Index Scan using cobat_version_t_pkey on version_t vers (cost=0.14..0.16 rows=1 width=106) (actual time=0.003..0.003 rows=1 loops=25)

  • Index Cond: (c.version_id = id)
42. 0.075 0.075 ↓ 0.0 0 25

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.003..0.003 rows=0 loops=25)

  • Index Cond: (id = board.nearest_term_date_id)
43. 0.050 0.050 ↓ 0.0 0 25

Index Scan using term_t_pkey on term_t term (cost=0.28..0.29 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=25)

  • Index Cond: (id = tfc.term_id)
44. 0.025 0.025 ↓ 0.0 0 25

Index Scan using term_dictionary_t_pkey on term_dictionary_t termdic (cost=0.14..0.20 rows=1 width=87) (actual time=0.001..0.001 rows=0 loops=25)

  • Index Cond: (id = term.term_dictionary_id)
45. 0.075 0.075 ↓ 0.0 0 25

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

  • Index Cond: (id = tfc.deadline_id)
46. 0.013 0.025 ↑ 1.0 1 25

Materialize (cost=0.00..1.85 rows=1 width=35) (actual time=0.000..0.001 rows=1 loops=25)

47. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on authority_abstract_t abstractau2_ (cost=0.00..1.85 rows=1 width=35) (actual time=0.006..0.012 rows=1 loops=1)

  • Filter: (id = 20)
  • Rows Removed by Filter: 67
48.          

SubPlan (for Nested Loop)

49. 0.000 0.000 ↓ 0.0 0

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

50. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
51. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id = interv.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
52. 317.772 844.804 ↓ 2.2 576,866 1

Hash Join (cost=23,481.51..74,388.49 rows=263,713 width=8) (actual time=270.029..844.804 rows=576,866 loops=1)

  • Hash Cond: (interv_1.id = intervp_1.id)
53. 260.162 260.162 ↑ 1.0 787,827 1

Seq Scan on intervenor_t interv_1 (cost=0.00..45,313.39 rows=788,389 width=16) (actual time=0.005..260.162 rows=787,827 loops=1)

  • Filter: is_primary
  • Rows Removed by Filter: 975912
54. 134.801 266.870 ↑ 1.0 589,964 1

Hash (cost=16,106.96..16,106.96 rows=589,964 width=8) (actual time=266.870..266.870 rows=589,964 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 31238kB
55. 132.069 132.069 ↑ 1.0 589,964 1

Seq Scan on intervening_person_t intervp_1 (cost=0.00..16,106.96 rows=589,964 width=8) (actual time=0.014..132.069 rows=589,964 loops=1)

  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 117953
56. 0.075 2.400 ↓ 0.0 0 25

Nested Loop (cost=1.70..25.66 rows=1 width=17) (actual time=0.095..0.096 rows=0 loops=25)

  • Join Filter: (intervp_2.person_id = pnat.id)
57. 0.050 0.600 ↑ 1.0 1 25

Nested Loop (cost=1.28..25.16 rows=1 width=16) (actual time=0.023..0.024 rows=1 loops=25)

58. 0.069 0.400 ↑ 1.0 1 25

Nested Loop (cost=0.85..24.62 rows=1 width=8) (actual time=0.015..0.016 rows=1 loops=25)

59. 0.175 0.175 ↑ 1.0 1 25

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

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

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.006..0.006 rows=1 loops=26)

  • Index Cond: (id = interv_2.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
61. 0.150 0.150 ↑ 1.0 1 25

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

  • Index Cond: (id = intervp_2.person_id)
  • Heap Fetches: 25
62. 1.725 1.725 ↓ 0.0 0 25

Index Scan using pk_person_natural_t on person_natural_t pnat (cost=0.42..0.47 rows=1 width=25) (actual time=0.069..0.069 rows=0 loops=25)

  • Index Cond: (id = pers.id)
63. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.70..26.84 rows=1 width=25) (never executed)

  • Join Filter: (intervp_3.person_id = pleg.id)
64. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.28..25.16 rows=1 width=16) (never executed)

65. 0.000 0.000 ↓ 0.0 0

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

66. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
67. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id = interv_3.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
68. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_person_t on person_t pers_1 (cost=0.42..0.53 rows=1 width=8) (never executed)

  • Index Cond: (id = intervp_3.person_id)
  • Heap Fetches: 0
69. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_person_legal_t on person_legal_t pleg (cost=0.42..0.47 rows=1 width=33) (never executed)

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

SubPlan (for Nested Loop)

71. 0.000 0.000 ↓ 0.0 0

Seq Scan on juridical_form_t (cost=0.00..1.19 rows=1 width=516) (never executed)

  • Filter: (id = pleg.juridical_form_id)
72. 0.000 0.000 ↓ 0.0 0

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

73. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
74. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id = interv_4.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
75. 337.110 866.826 ↓ 2.2 576,866 1

Hash Join (cost=23,481.51..74,388.49 rows=263,713 width=8) (actual time=266.125..866.826 rows=576,866 loops=1)

  • Hash Cond: (interv_5.id = intervp_5.id)
76. 266.660 266.660 ↑ 1.0 787,827 1

Seq Scan on intervenor_t interv_5 (cost=0.00..45,313.39 rows=788,389 width=16) (actual time=0.005..266.660 rows=787,827 loops=1)

  • Filter: is_primary
  • Rows Removed by Filter: 975912
77. 131.495 263.056 ↑ 1.0 589,964 1

Hash (cost=16,106.96..16,106.96 rows=589,964 width=8) (actual time=263.056..263.056 rows=589,964 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 31238kB
78. 131.561 131.561 ↑ 1.0 589,964 1

Seq Scan on intervening_person_t intervp_5 (cost=0.00..16,106.96 rows=589,964 width=8) (actual time=0.018..131.561 rows=589,964 loops=1)

  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
  • Rows Removed by Filter: 117953
79. 0.050 0.475 ↓ 0.0 0 25

Nested Loop (cost=1.70..25.66 rows=1 width=17) (actual time=0.019..0.019 rows=0 loops=25)

  • Join Filter: (intervp_6.person_id = pnat_1.id)
80. 0.000 0.375 ↑ 1.0 1 25

Nested Loop (cost=1.28..25.16 rows=1 width=16) (actual time=0.015..0.015 rows=1 loops=25)

81. 0.072 0.275 ↑ 1.0 1 25

Nested Loop (cost=0.85..24.62 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=25)

82. 0.125 0.125 ↑ 1.0 1 25

Index Scan using intervenor_case_idx on intervenor_t interv_6 (cost=0.43..16.17 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=25)

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
  • Rows Removed by Filter: 1
83. 0.078 0.078 ↑ 1.0 1 26

Index Scan using pk_intervening_person_t on intervening_person_t intervp_6 (cost=0.42..8.45 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=26)

  • Index Cond: (id = interv_6.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
84. 0.100 0.100 ↑ 1.0 1 25

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

  • Index Cond: (id = intervp_6.person_id)
  • Heap Fetches: 25
85. 0.050 0.050 ↓ 0.0 0 25

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

  • Index Cond: (id = pers_2.id)
86. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.70..26.84 rows=1 width=25) (never executed)

  • Join Filter: (intervp_7.person_id = pleg_1.id)
87. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.28..25.16 rows=1 width=16) (never executed)

88. 0.000 0.000 ↓ 0.0 0

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

89. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (case_id = c.id)
  • Filter: is_primary
90. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (id = interv_7.id)
  • Filter: ((intervening_person_context)::text = 'REQUESTER'::text)
91. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_person_t on person_t pers_3 (cost=0.42..0.53 rows=1 width=8) (never executed)

  • Index Cond: (id = intervp_7.person_id)
  • Heap Fetches: 0
92. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_person_legal_t on person_legal_t pleg_1 (cost=0.42..0.47 rows=1 width=33) (never executed)

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

SubPlan (for Nested Loop)

94. 0.000 0.000 ↓ 0.0 0

Seq Scan on juridical_form_t juridical_form_t_1 (cost=0.00..1.19 rows=1 width=516) (never executed)

  • Filter: (id = pleg_1.juridical_form_id)
95. 0.050 0.600 ↑ 1.0 1 25

Nested Loop Left Join (cost=1.56..30.99 rows=1 width=17) (actual time=0.021..0.024 rows=1 loops=25)

96. 0.025 0.450 ↑ 1.0 1 25

Nested Loop Left Join (cost=1.13..25.00 rows=1 width=8) (actual time=0.015..0.018 rows=1 loops=25)

97. 0.057 0.350 ↑ 1.0 1 25

Nested Loop (cost=0.85..24.69 rows=1 width=8) (actual time=0.011..0.014 rows=1 loops=25)

98. 0.125 0.125 ↑ 1.0 1 25

Index Scan using intervenor_case_idx on intervenor_t i (cost=0.43..16.24 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=25)

  • 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
99. 0.168 0.168 ↑ 1.0 1 28

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

  • Index Cond: (id = i.id)
  • Filter: (on_behalf_of_authority_id = c.managing_authority_id)
  • Rows Removed by Filter: 0
100. 0.075 0.075 ↑ 1.0 1 25

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=25)

  • Index Cond: (id = iu.user_id)
101. 0.100 0.100 ↑ 1.0 1 25

Index Scan using pk_person_natural_t on person_natural_t p_1 (cost=0.42..5.97 rows=1 width=25) (actual time=0.003..0.004 rows=1 loops=25)

  • Index Cond: (id = up.abstract_person_id)
102. 0.000 0.200 ↓ 0.0 0 25

Limit (cost=0.43..22.62 rows=1 width=16) (actual time=0.008..0.008 rows=0 loops=25)

103. 0.200 0.200 ↓ 0.0 0 25

Index Scan using reference_case_idx on reference_t ref_muni (cost=0.43..22.62 rows=1 width=16) (actual time=0.008..0.008 rows=0 loops=25)

  • Index Cond: (external_id = c.id)
  • Filter: ((managing_authority_id = c.main_impacted_muni_id) AND (reference_type_id = 38))
  • Rows Removed by Filter: 10
104. 0.025 0.100 ↑ 1.0 1 25

Limit (cost=0.43..22.62 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=25)

105. 0.075 0.075 ↑ 1.0 1 25

Index Scan using reference_case_idx on reference_t ref_region (cost=0.43..22.62 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=25)

  • Index Cond: (external_id = c.id)
  • Filter: ((managing_authority_id = 20) AND (reference_type_id = 1))
  • Rows Removed by Filter: 1
106. 0.025 0.150 ↓ 0.0 0 25

Limit (cost=0.43..22.62 rows=1 width=16) (actual time=0.006..0.006 rows=0 loops=25)

107. 0.125 0.125 ↓ 0.0 0 25

Index Scan using reference_case_idx on reference_t ref_ibge (cost=0.43..22.62 rows=1 width=16) (actual time=0.005..0.005 rows=0 loops=25)

  • Index Cond: (external_id = c.id)
  • Filter: ((managing_authority_id = 21) AND (reference_type_id = 28))
  • Rows Removed by Filter: 12
108. 0.075 0.525 ↓ 0.0 0 25

Limit (cost=10.14..14.15 rows=1 width=16) (actual time=0.021..0.021 rows=0 loops=25)

109. 0.050 0.450 ↓ 0.0 0 25

Bitmap Heap Scan on reference_t ref_spec (cost=10.14..14.15 rows=1 width=16) (actual time=0.018..0.018 rows=0 loops=25)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 50))
  • Filter: (managing_authority_id = 20)
110. 0.025 0.400 ↓ 0.0 0 25

BitmapAnd (cost=10.14..10.14 rows=1 width=0) (actual time=0.016..0.016 rows=0 loops=25)

111. 0.100 0.100 ↓ 1.7 12 25

Bitmap Index Scan on reference_case_idx (cost=0.00..4.49 rows=7 width=0) (actual time=0.004..0.004 rows=12 loops=25)

  • Index Cond: (external_id = c.id)
112. 0.275 0.275 ↑ 3.0 43 25

Bitmap Index Scan on reference_type_idx (cost=0.00..5.40 rows=129 width=0) (actual time=0.011..0.011 rows=43 loops=25)

  • Index Cond: (reference_type_id = 50)
113. 0.025 0.150 ↓ 0.0 0 25

Limit (cost=0.43..22.62 rows=1 width=25) (actual time=0.006..0.006 rows=0 loops=25)

114. 0.125 0.125 ↓ 0.0 0 25

Index Scan using reference_case_idx on reference_t ref_muni_1 (cost=0.43..22.62 rows=1 width=25) (actual time=0.005..0.005 rows=0 loops=25)

  • Index Cond: (external_id = c.id)
  • Filter: ((managing_authority_id = c.main_impacted_muni_id) AND (reference_type_id = 38))
  • Rows Removed by Filter: 10
115. 0.025 0.100 ↑ 1.0 1 25

Limit (cost=0.43..22.62 rows=1 width=25) (actual time=0.004..0.004 rows=1 loops=25)

116. 0.075 0.075 ↑ 1.0 1 25

Index Scan using reference_case_idx on reference_t ref_region_1 (cost=0.43..22.62 rows=1 width=25) (actual time=0.003..0.003 rows=1 loops=25)

  • Index Cond: (external_id = c.id)
  • Filter: ((managing_authority_id = 20) AND (reference_type_id = 1))
  • Rows Removed by Filter: 1
117. 0.025 0.150 ↓ 0.0 0 25

Limit (cost=0.43..22.62 rows=1 width=25) (actual time=0.006..0.006 rows=0 loops=25)

118. 0.125 0.125 ↓ 0.0 0 25

Index Scan using reference_case_idx on reference_t ref_ibge_1 (cost=0.43..22.62 rows=1 width=25) (actual time=0.005..0.005 rows=0 loops=25)

  • Index Cond: (external_id = c.id)
  • Filter: ((managing_authority_id = 21) AND (reference_type_id = 28))
  • Rows Removed by Filter: 12
119. 0.025 0.325 ↓ 0.0 0 25

Limit (cost=10.14..14.15 rows=1 width=25) (actual time=0.013..0.013 rows=0 loops=25)

120. 0.025 0.300 ↓ 0.0 0 25

Bitmap Heap Scan on reference_t ref_spec_1 (cost=10.14..14.15 rows=1 width=25) (actual time=0.012..0.012 rows=0 loops=25)

  • Recheck Cond: ((external_id = c.id) AND (reference_type_id = 50))
  • Filter: (managing_authority_id = 20)
121. 0.025 0.275 ↓ 0.0 0 25

BitmapAnd (cost=10.14..10.14 rows=1 width=0) (actual time=0.011..0.011 rows=0 loops=25)

122. 0.075 0.075 ↓ 1.7 12 25

Bitmap Index Scan on reference_case_idx (cost=0.00..4.49 rows=7 width=0) (actual time=0.003..0.003 rows=12 loops=25)

  • Index Cond: (external_id = c.id)
123. 0.175 0.175 ↑ 3.0 43 25

Bitmap Index Scan on reference_type_idx (cost=0.00..5.40 rows=129 width=0) (actual time=0.007..0.007 rows=43 loops=25)

  • Index Cond: (reference_type_id = 50)
Planning time : 264.741 ms