explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QAQD

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 748.097 ↑ 1.0 25 1

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

2. 0.013 748.083 ↑ 24.2 25 1

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

3. 0.608 747.395 ↑ 24.2 25 1

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

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

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

5. 0.071 727.199 ↑ 28.0 25 1

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

6. 0.054 714.078 ↑ 28.0 25 1

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

7. 0.045 706.674 ↑ 28.0 25 1

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

8. 204.575 695.129 ↑ 28.0 25 1

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

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

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

10. 67.383 67.383 ↑ 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.933..67.383 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. 162.318 162.318 ↑ 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.003..0.003 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. 11.500 11.500 ↑ 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.460..0.460 rows=1 loops=25)

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

  • Index Cond: (id = config.current_phase_id)
17. 13.050 13.050 ↑ 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.521..0.522 rows=1 loops=25)

  • Index Cond: (g.id = geolocation_id)
  • Filter: ((context_type)::text = 'TARGET'::text)
  • Rows Removed by Filter: 1
18. 17.850 17.850 ↑ 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.713..0.714 rows=1 loops=25)

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

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

20. 1.193 1.193 ↓ 1.0 295 1

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

21. 0.022 0.675 ↑ 1.0 1 25

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

22. 0.653 0.653 ↑ 1.0 1 1

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

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