explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QgFn

Settings
# exclusive inclusive rows x rows loops node
1. 0.141 15.181 ↓ 87.7 614 1

Unique (cost=42.06..42.10 rows=7 width=23) (actual time=14.987..15.181 rows=614 loops=1)

2. 6.684 15.040 ↓ 87.7 614 1

Sort (cost=42.06..42.08 rows=7 width=23) (actual time=14.986..15.040 rows=614 loops=1)

  • Sort Key: permissions.id
  • Sort Method: quicksort Memory: 69kB
3. 0.071 8.356 ↓ 87.7 614 1

Nested Loop (cost=10.58..41.97 rows=7 width=23) (actual time=0.090..8.356 rows=614 loops=1)

4. 0.125 0.303 ↓ 87.7 614 1

Nested Loop (cost=10.30..39.69 rows=7 width=22) (actual time=0.071..0.303 rows=614 loops=1)

5. 0.001 0.017 ↑ 1.0 1 1

Nested Loop (cost=0.00..2.52 rows=1 width=292) (actual time=0.013..0.017 rows=1 loops=1)

  • Join Filter: ((user_roles.role_id)::text = (roles.id)::text)
6. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on user_roles (cost=0.00..1.41 rows=1 width=146) (actual time=0.008..0.012 rows=1 loops=1)

  • Filter: (user_id = '90dea221-0199-4e9f-84da-87aa5e186d4e'::uuid)
  • Rows Removed by Filter: 32
7. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on roles (cost=0.00..1.09 rows=1 width=146) (actual time=0.004..0.004 rows=1 loops=1)

  • Filter: (deleted_at IS NULL)
8. 0.112 0.161 ↓ 2.4 614 1

Bitmap Heap Scan on role_permissions (cost=10.30..34.57 rows=261 width=32) (actual time=0.054..0.161 rows=614 loops=1)

  • Recheck Cond: ((role_id)::text = (user_roles.role_id)::text)
  • Heap Blocks: exact=12
9. 0.049 0.049 ↓ 2.4 614 1

Bitmap Index Scan on role_permissions_role_id_index (cost=0.00..10.24 rows=261 width=0) (actual time=0.049..0.049 rows=614 loops=1)

  • Index Cond: ((role_id)::text = (user_roles.role_id)::text)
10. 7.982 7.982 ↑ 1.0 1 614

Index Scan using permissions_pkey on permissions (cost=0.28..0.33 rows=1 width=23) (actual time=0.013..0.013 rows=1 loops=614)

  • Index Cond: ((id)::text = (role_permissions.permission_id)::text)
  • Filter: (deleted_at IS NULL)
Planning time : 0.989 ms
Execution time : 15.324 ms