explain.depesz.com

PostgreSQL's explain analyze made readable

Result: j914

Settings
# exclusive inclusive rows x rows loops node
1. 0.023 1.224 ↓ 11.8 47 1

Nested Loop (cost=17.07..108.41 rows=4 width=329) (actual time=0.247..1.224 rows=47 loops=1)

  • Output: users.id, users.created, users.updated, users.first_name, users.last_name, users.email, users.status, users.company_id, roles.id, roles.created, roles.updated, roles.role_name, roles.realm_id, permissions.id, permissions.created, permissions.updated, permissions.permission_name, permissions.realm_id, realm.id, realm.created, realm.updated, realm.realm_name, realm.redirect_uris, company.id, company.created, company.updated, company.company_name
  • Join Filter: (permissions.realm_id = realm.id)
  • Rows Removed by Join Filter: 74
2. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on public.realm (cost=0.00..1.09 rows=1 width=110) (actual time=0.007..0.009 rows=1 loops=1)

  • Output: realm.id, realm.created, realm.updated, realm.realm_name, realm.redirect_uris
  • Filter: ((realm.realm_name)::text = 'dash26_einstein'::text)
  • Rows Removed by Filter: 8
3. 0.033 1.192 ↓ 4.3 121 1

Nested Loop (cost=17.07..106.97 rows=28 width=219) (actual time=0.239..1.192 rows=121 loops=1)

  • Output: users.id, users.created, users.updated, users.first_name, users.last_name, users.email, users.status, users.company_id, roles.id, roles.created, roles.updated, roles.role_name, roles.realm_id, permissions.id, permissions.created, permissions.updated, permissions.permission_name, permissions.realm_id, company.id, company.created, company.updated, company.company_name
  • Inner Unique: true
4. 0.043 1.038 ↓ 4.3 121 1

Nested Loop (cost=16.92..102.07 rows=28 width=178) (actual time=0.232..1.038 rows=121 loops=1)

  • Output: users.id, users.created, users.updated, users.first_name, users.last_name, users.email, users.status, users.company_id, roles.id, roles.created, roles.updated, roles.role_name, roles.realm_id, role_permission.permission_id, company.id, company.created, company.updated, company.company_name
  • Join Filter: (roles.id = role_permission.role_id)
5. 0.005 0.851 ↓ 2.0 4 1

Nested Loop (cost=16.64..100.62 rows=2 width=178) (actual time=0.206..0.851 rows=4 loops=1)

  • Output: users.id, users.created, users.updated, users.first_name, users.last_name, users.email, users.status, users.company_id, user_role.role_id, roles.id, roles.created, roles.updated, roles.role_name, roles.realm_id, company.id, company.created, company.updated, company.company_name
  • Inner Unique: true
6. 0.452 0.838 ↓ 2.0 4 1

Hash Join (cost=16.49..100.28 rows=2 width=133) (actual time=0.199..0.838 rows=4 loops=1)

  • Output: users.id, users.created, users.updated, users.first_name, users.last_name, users.email, users.status, users.company_id, user_role.role_id, company.id, company.created, company.updated, company.company_name
  • Hash Cond: (user_role.leibniz_user_id = users.id)
7. 0.348 0.348 ↓ 1.0 4,126 1

Seq Scan on public.roles_users user_role (cost=0.00..68.56 rows=4,056 width=16) (actual time=0.005..0.348 rows=4,126 loops=1)

  • Output: user_role.role_id, user_role.leibniz_user_id, user_role.created
8. 0.004 0.038 ↑ 1.0 1 1

Hash (cost=16.48..16.48 rows=1 width=125) (actual time=0.038..0.038 rows=1 loops=1)

  • Output: users.id, users.created, users.updated, users.first_name, users.last_name, users.email, users.status, users.company_id, company.id, company.created, company.updated, company.company_name
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.001 0.034 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.43..16.48 rows=1 width=125) (actual time=0.033..0.034 rows=1 loops=1)

  • Output: users.id, users.created, users.updated, users.first_name, users.last_name, users.email, users.status, users.company_id, company.id, company.created, company.updated, company.company_name
  • Inner Unique: true
10. 0.027 0.027 ↑ 1.0 1 1

Index Scan using leibniz_user_email_idx on public.leibniz_user users (cost=0.28..8.30 rows=1 width=73) (actual time=0.027..0.027 rows=1 loops=1)

  • Output: users.id, users.created, users.updated, users.first_name, users.last_name, users.email, users.status, users.company_id
  • Index Cond: ((users.email)::text = 'aleksandr.sakharov@n26.com'::text)
  • Filter: (users.status = 'ACTIVE'::user_status_enum)
11. 0.006 0.006 ↑ 1.0 1 1

Index Scan using company_id_pkey on public.company (cost=0.15..8.17 rows=1 width=52) (actual time=0.006..0.006 rows=1 loops=1)

  • Output: company.id, company.created, company.updated, company.company_name
  • Index Cond: (company.id = users.company_id)
12. 0.008 0.008 ↑ 1.0 1 4

Index Scan using role_id_pkey on public.role roles (cost=0.14..0.17 rows=1 width=45) (actual time=0.002..0.002 rows=1 loops=4)

  • Output: roles.id, roles.created, roles.updated, roles.role_name, roles.realm_id
  • Index Cond: (roles.id = user_role.role_id)
13. 0.144 0.144 ↓ 2.1 30 4

Index Only Scan using roles_permissions_role_id_permission_id_pkey on public.roles_permissions role_permission (cost=0.28..0.55 rows=14 width=16) (actual time=0.008..0.036 rows=30 loops=4)

  • Output: role_permission.role_id, role_permission.permission_id
  • Index Cond: (role_permission.role_id = user_role.role_id)
  • Heap Fetches: 56
14. 0.121 0.121 ↑ 1.0 1 121

Index Scan using permission_id_pkey on public.permission permissions (cost=0.15..0.18 rows=1 width=49) (actual time=0.001..0.001 rows=1 loops=121)

  • Output: permissions.id, permissions.created, permissions.updated, permissions.permission_name, permissions.realm_id
  • Index Cond: (permissions.id = role_permission.permission_id)
Planning time : 3.931 ms
Execution time : 1.378 ms