explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wgIt

Settings
# exclusive inclusive rows x rows loops node
1. 32.626 13,825.075 ↓ 3,333.0 3,333 1

Nested Loop Semi Join (cost=2.01..26.21 rows=1 width=10) (actual time=101.348..13,825.075 rows=3,333 loops=1)

2. 11.593 248.289 ↓ 66,720.0 66,720 1

Nested Loop (cost=0.86..16.89 rows=1 width=10) (actual time=0.059..248.289 rows=66,720 loops=1)

3. 36.536 36.536 ↓ 66,720.0 66,720 1

Index Only Scan using fs_userpermission_user_id_permission_id_baa0e460_uniq on fs_userpermission (cost=0.43..8.45 rows=1 width=4) (actual time=0.036..36.536 rows=66,720 loops=1)

  • Index Cond: (user_id = 1239)
  • Heap Fetches: 66720
4. 200.160 200.160 ↑ 1.0 1 66,720

Index Scan using fs_permission_pkey on fs_permission (cost=0.42..8.44 rows=1 width=14) (actual time=0.003..0.003 rows=1 loops=66,720)

  • Index Cond: (id = fs_userpermission.permission_id)
5. 3,038.364 13,544.160 ↓ 0.0 0 66,720

Nested Loop (cost=1.15..9.30 rows=1 width=8) (actual time=0.203..0.203 rows=0 loops=66,720)

  • Join Filter: (u1.id = u2.permission_id)
  • Rows Removed by Join Filter: 674
6. 0.000 200.160 ↓ 0.0 0 66,720

Nested Loop (cost=0.72..0.84 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=66,720)

  • Join Filter: (u0.id = u1.node_id)
7. 200.160 200.160 ↓ 0.0 0 66,720

Index Scan using fs_node_pkey on fs_node u0 (cost=0.29..0.34 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=66,720)

  • Index Cond: (id = fs_permission.node_id)
  • Filter: ((archived_at IS NULL) AND (path ~ '1.402.403.5261.40005.40006.40009.44636.*{1}'::lquery))
  • Rows Removed by Filter: 1
8. 16.665 16.665 ↑ 1.0 1 3,333

Index Scan using fs_permission_node_id_access_right_81ac3a0e_uniq on fs_permission u1 (cost=0.42..0.48 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=3,333)

  • Index Cond: ((node_id = fs_permission.node_id) AND ((access_right)::text = 'view'::text))
9. 10,305.636 10,305.636 ↓ 13,496.0 13,496 3,333

Index Only Scan using fs_userpermission_user_id_permission_id_baa0e460_uniq on fs_userpermission u2 (cost=0.43..8.45 rows=1 width=4) (actual time=0.006..3.092 rows=13,496 loops=3,333)

  • Index Cond: (user_id = 1239)
  • Heap Fetches: 44981952
Planning time : 2.212 ms
Execution time : 13,825.678 ms