explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xpkD

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Gather (cost=1,306.99..23,964,952.99 rows=6,523 width=246) (actual rows= loops=)

  • Workers Planned: 2
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=306.99..43,990.59 rows=2,718 width=94) (actual rows= loops=)

  • Hash Cond: ((ue.realm_id)::text = (r.id)::text)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=305.96..43,945.05 rows=5,436 width=94) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on user_attribute ua (cost=305.53..22,709.30 rows=5,436 width=46) (actual rows= loops=)

  • Recheck Cond: ((name)::text = 'employeeId'::text)
  • Filter: (value IS NOT NULL)
5. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on name_idx (cost=0.00..302.27 rows=13,046 width=0) (actual rows= loops=)

  • Index Cond: ((name)::text = 'employeeId'::text)
6. 0.000 0.000 ↓ 0.0

Index Scan using constraint_fb on user_entity ue (cost=0.42..3.91 rows=1 width=85) (actual rows= loops=)

  • Index Cond: ((id)::text = (ua.user_id)::text)
7. 0.000 0.000 ↓ 0.0

Hash (cost=1.02..1.02 rows=1 width=14) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on realm r (cost=0.00..1.02 rows=1 width=14) (actual rows= loops=)

  • Filter: ((name)::text <> 'master'::text)
9.          

SubPlan (for Gather)

10. 0.000 0.000 ↓ 0.0

Limit (cost=8.17..8.18 rows=1 width=8) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=8) (actual rows= loops=)

  • Sort Key: aee.admin_event_time DESC
12. 0.000 0.000 ↓ 0.0

Index Scan using resource_type_idx on admin_event_entity aee (cost=0.14..8.16 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((resource_type)::text = 'USER'::text)
  • Filter: ((representation ~~ '%"enabled":false%'::text) AND ((operation_type)::text = 'UPDATE'::text) AND ((resource_path)::text = concat('users/', ue.id)))
13. 0.000 0.000 ↓ 0.0

Aggregate (cost=30.98..30.99 rows=1 width=32) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=24.70..30.97 rows=2 width=11) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash Join (cost=24.58..30.42 rows=2 width=18) (actual rows= loops=)

  • Hash Cond: ((kr.id)::text = (urm.role_id)::text)
16. 0.000 0.000 ↓ 0.0

Seq Scan on keycloak_role kr (cost=0.00..5.71 rows=51 width=55) (actual rows= loops=)

  • Filter: ((NOT client_role) AND ((name)::text <> ALL ('{offline_access,uma_authorization,user}'::text[])))
17. 0.000 0.000 ↓ 0.0

Hash (cost=24.51..24.51 rows=5 width=37) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using idx_user_role_mapping on user_role_mapping urm (cost=0.43..24.51 rows=5 width=37) (actual rows= loops=)

  • Index Cond: ((user_id)::text = (ue.id)::text)
19. 0.000 0.000 ↓ 0.0

Index Only Scan using constraint_4a on realm r_1 (cost=0.13..0.30 rows=1 width=7) (actual rows= loops=)

  • Index Cond: (id = (kr.realm_id)::text)
20. 0.000 0.000 ↓ 0.0

Aggregate (cost=3,627.73..3,627.74 rows=1 width=8) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on event_entity ee (cost=35.52..3,626.37 rows=545 width=8) (actual rows= loops=)

  • Recheck Cond: ((user_id)::text = (ue.id)::text)
  • Filter: ((type)::text = 'LOGIN'::text)
22. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on user_id_idx (cost=0.00..35.38 rows=909 width=0) (actual rows= loops=)

  • Index Cond: ((user_id)::text = (ue.id)::text)