explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uiVq

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 4,678.259 ↑ 3.6 5 1

Limit (cost=15,723,750.64..15,723,750.68 rows=18 width=16) (actual time=4,678.258..4,678.259 rows=5 loops=1)

2. 0.006 4,678.257 ↑ 3.6 5 1

Sort (cost=15,723,750.64..15,723,750.68 rows=18 width=16) (actual time=4,678.257..4,678.257 rows=5 loops=1)

  • Sort Key: c.reception_date
  • Sort Method: quicksort Memory: 25kB
3. 0.003 4,678.251 ↑ 3.6 5 1

Nested Loop (cost=2.56..15,723,750.26 rows=18 width=16) (actual time=4,678.023..4,678.251 rows=5 loops=1)

4. 0.014 0.014 ↑ 1.0 1 1

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

  • Filter: (id = 4)
  • Rows Removed by Filter: 67
5. 0.088 4,678.234 ↑ 3.6 5 1

Nested Loop (cost=2.56..15,723,748.23 rows=18 width=24) (actual time=4,678.012..4,678.234 rows=5 loops=1)

  • Join Filter: (p.definition_id = pdt.id)
  • Rows Removed by Join Filter: 1470
6. 0.036 0.036 ↓ 1.0 295 1

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

7. 0.160 4,678.110 ↑ 3.6 5 295

Materialize (cost=2.56..15,723,662.52 rows=18 width=32) (actual time=15.157..15.858 rows=5 loops=295)

8. 1.035 4,677.950 ↑ 3.6 5 1

Nested Loop (cost=2.56..15,723,662.43 rows=18 width=32) (actual time=4,471.244..4,677.950 rows=5 loops=1)

9. 0.259 4,671.523 ↓ 9.6 1,348 1

Nested Loop Left Join (cost=2.13..15,722,482.38 rows=140 width=24) (actual time=1,583.592..4,671.523 rows=1,348 loops=1)

10. 0.428 4,661.828 ↓ 9.6 1,348 1

Nested Loop Left Join (cost=1.70..15,722,395.73 rows=140 width=32) (actual time=1,583.572..4,661.828 rows=1,348 loops=1)

11. 1.263 4,654.660 ↓ 9.6 1,348 1

Nested Loop (cost=1.28..15,721,220.38 rows=140 width=24) (actual time=1,583.553..4,654.660 rows=1,348 loops=1)

12. 0.857 4,645.309 ↓ 9.6 1,348 1

Nested Loop (cost=0.85..15,721,136.92 rows=140 width=24) (actual time=1,583.535..4,645.309 rows=1,348 loops=1)

13. 1,567.256 4,636.364 ↓ 9.6 1,348 1

Index Scan using case_unique_business_id_idx on case_t c (cost=0.42..15,719,977.57 rows=140 width=48) (actual time=1,583.516..4,636.364 rows=1,348 loops=1)

  • Index Cond: ((case_type)::text = 'URBANISM'::text)
  • Filter: ((NOT a_new_version_exists) AND (f_unaccent(upper((SubPlan 1))) ~~ '%THOMAS%'::text))
  • Rows Removed by Filter: 437869
14.          

SubPlan (forIndex Scan)

15. 211.025 3,069.108 ↑ 1.0 1 438,444

Nested Loop Left Join (cost=1.56..35.34 rows=1 width=32) (actual time=0.006..0.007 rows=1 loops=438,444)

16. 211.025 2,630.664 ↑ 1.0 1 438,444

Nested Loop Left Join (cost=1.13..29.32 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=438,444)

17. 0.000 2,192.220 ↑ 1.0 1 438,444

Nested Loop (cost=0.85..29.00 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=438,444)

18. 1,753.776 1,753.776 ↑ 1.0 1 438,444

Index Scan using intervenor_case_idx on intervenor_t i (cost=0.43..20.55 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=438,444)

  • 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: 2
19. 749.014 749.014 ↑ 1.0 1 374,507

Index Scan using pk_intervening_user_t on intervening_user_t iu (cost=0.42..8.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=374,507)

  • Index Cond: (id = i.id)
  • Filter: (on_behalf_of_authority_id = c.managing_authority_id)
  • Rows Removed by Filter: 0
20. 227.419 227.419 ↑ 1.0 1 227,419

Index Scan using pk_user_person_t on user_person_t up (cost=0.28..0.30 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=227,419)

  • Index Cond: (id = iu.user_id)
21. 227.419 227.419 ↑ 1.0 1 227,419

Index Scan using pk_person_natural_t on person_natural_t p_1 (cost=0.42..6.00 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=227,419)

  • Index Cond: (id = up.abstract_person_id)
22. 8.088 8.088 ↑ 1.0 1 1,348

Index Scan using pk_configuration_t on configuration_t config (cost=0.42..8.27 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=1,348)

  • Index Cond: (id = c.configuration_id)
23. 8.088 8.088 ↑ 1.0 1 1,348

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

  • Index Cond: (id = config.current_phase_id)
24. 6.740 6.740 ↑ 1.0 1 1,348

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

  • Index Cond: (case_id = c.id)
25. 9.436 9.436 ↑ 1.0 1 1,348

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.007 rows=1 loops=1,348)

  • Index Cond: (g.id = geolocation_id)
  • Filter: ((context_type)::text = 'TARGET'::text)
  • Rows Removed by Filter: 2
26. 5.392 5.392 ↓ 0.0 0 1,348

Index Only Scan using pk_case_actor_authority on case_actor_authority_t actors1_ (cost=0.43..8.42 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=1,348)

  • Index Cond: ((case_id = c.id) AND (authority_abstract_id = 4))
  • Heap Fetches: 5
Planning time : 3.390 ms