explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7yDd

Settings
# exclusive inclusive rows x rows loops node
1. 0.023 974.246 ↑ 1.0 25 1

Limit (cost=2.99..36,932.09 rows=25 width=16) (actual time=104.263..974.246 rows=25 loops=1)

2. 0.016 974.223 ↑ 24.2 25 1

Nested Loop (cost=2.99..895,164.49 rows=606 width=16) (actual time=104.263..974.223 rows=25 loops=1)

3. 0.769 973.757 ↑ 24.2 25 1

Nested Loop (cost=2.99..895,155.06 rows=606 width=24) (actual time=103.827..973.757 rows=25 loops=1)

  • Join Filter: (p.definition_id = pdt.id)
  • Rows Removed by Join Filter: 7096
4. 0.099 971.463 ↑ 24.2 25 1

Nested Loop (cost=2.99..892,493.13 rows=606 width=32) (actual time=102.843..971.463 rows=25 loops=1)

5. 0.081 952.264 ↑ 28.0 25 1

Nested Loop Left Join (cost=2.56..892,023.39 rows=700 width=24) (actual time=101.589..952.264 rows=25 loops=1)

6. 0.093 938.758 ↑ 28.0 25 1

Nested Loop (cost=2.13..891,590.13 rows=700 width=32) (actual time=100.889..938.758 rows=25 loops=1)

7. 0.045 930.815 ↑ 28.0 25 1

Nested Loop (cost=1.71..891,172.85 rows=700 width=32) (actual time=100.164..930.815 rows=25 loops=1)

8. 258.812 923.045 ↑ 28.0 25 1

Nested Loop Left Join (cost=1.28..890,796.45 rows=700 width=32) (actual time=99.750..923.045 rows=25 loops=1)

  • Filter: (f_unaccent(upper((SubPlan 1))) ~~ '%ROUGE%'::text)
  • Rows Removed by Filter: 54081
9. 57.095 339.597 ↑ 8.1 54,106 1

Nested Loop Left Join (cost=0.85..389,187.25 rows=437,754 width=40) (actual time=1.028..339.597 rows=54,106 loops=1)

10. 120.184 120.184 ↑ 8.1 54,106 1

Index Scan using case_reception_date_idx on case_t c (cost=0.42..124,947.57 rows=437,754 width=48) (actual time=0.998..120.184 rows=54,106 loops=1)

  • Filter: ((NOT deleted) AND (NOT a_new_version_exists) AND ((case_type)::text = 'URBANISM'::text))
  • Rows Removed by Filter: 4960
11. 162.318 162.318 ↑ 1.0 1 54,106

Index Scan using geolocation__case_idx on geolocation_t g (cost=0.42..0.59 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=54,106)

  • Index Cond: (case_id = c.id)
12. 270.530 270.530 ↑ 1.0 1 54,106

Index Scan using pk_address_t on address_t ad (cost=0.43..0.85 rows=1 width=29) (actual time=0.004..0.005 rows=1 loops=54,106)

  • Index Cond: (id = g.target_principal_address_id)
13.          

SubPlan (forNested Loop Left Join)

14. 54.106 54.106 ↑ 1.0 1 54,106

Result (cost=0.00..0.03 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=54,106)

15. 7.725 7.725 ↑ 1.0 1 25

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

  • Index Cond: (id = c.configuration_id)
16. 7.850 7.850 ↑ 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.314..0.314 rows=1 loops=25)

  • Index Cond: (id = config.current_phase_id)
17. 13.425 13.425 ↑ 1.0 1 25

Index Scan using geolocation_localization_context_geolocation_id_idx on geolocation_localization_context_t glc (cost=0.43..0.61 rows=1 width=16) (actual time=0.535..0.537 rows=1 loops=25)

  • Index Cond: (g.id = geolocation_id)
  • Filter: ((context_type)::text = 'TARGET'::text)
  • Rows Removed by Filter: 1
18. 19.100 19.100 ↑ 1.0 1 25

Index Only Scan using pk_case_actor_authority on case_actor_authority_t actors1_ (cost=0.43..0.66 rows=1 width=16) (actual time=0.763..0.764 rows=1 loops=25)

  • Index Cond: ((case_id = c.id) AND (authority_abstract_id = 20))
  • Heap Fetches: 25
19. 0.566 1.525 ↑ 1.0 285 25

Materialize (cost=0.00..8.38 rows=292 width=8) (actual time=0.017..0.061 rows=285 loops=25)

20. 0.959 0.959 ↓ 1.0 295 1

Seq Scan on phase_definition_t pdt (cost=0.00..6.92 rows=292 width=8) (actual time=0.402..0.959 rows=295 loops=1)

21. 0.017 0.450 ↑ 1.0 1 25

Materialize (cost=0.00..1.85 rows=1 width=8) (actual time=0.018..0.018 rows=1 loops=25)

22. 0.433 0.433 ↑ 1.0 1 1

Seq Scan on authority_abstract_t abstractau2_ (cost=0.00..1.85 rows=1 width=8) (actual time=0.429..0.433 rows=1 loops=1)

  • Filter: (id = 20)
  • Rows Removed by Filter: 67
Planning time : 24.188 ms