explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P5M

Settings
# exclusive inclusive rows x rows loops node
1. 1.684 60.682 ↓ 1,111.0 6,666 1

Nested Loop (cost=1,588.46..2,470.27 rows=6 width=10) (actual time=23.666..60.682 rows=6,666 loops=1)

2. 1.629 32.334 ↓ 11.7 6,666 1

Nested Loop (cost=1,588.03..1,664.65 rows=570 width=14) (actual time=23.658..32.334 rows=6,666 loops=1)

3. 1.193 24.039 ↓ 11.7 1,111 1

HashAggregate (cost=1,587.60..1,588.55 rows=95 width=12) (actual time=23.647..24.039 rows=1,111 loops=1)

  • Group Key: u0.id
4. 1.230 22.846 ↓ 11.7 1,111 1

Nested Loop (cost=14.16..1,587.37 rows=95 width=12) (actual time=5.579..22.846 rows=1,111 loops=1)

5. 1.220 17.172 ↓ 11.7 1,111 1

Nested Loop (cost=13.73..1,134.47 rows=95 width=16) (actual time=5.553..17.172 rows=1,111 loops=1)

6. 0.658 11.508 ↓ 12.1 1,111 1

Nested Loop (cost=13.30..1,071.53 rows=92 width=8) (actual time=5.525..11.508 rows=1,111 loops=1)

7. 2.266 7.514 ↓ 11.8 1,112 1

Bitmap Heap Scan on fs_node (cost=13.01..342.39 rows=94 width=4) (actual time=5.499..7.514 rows=1,112 loops=1)

  • Recheck Cond: (path ~ '1.402.403.5261.40005.40006.40009.44636.*{1}'::lquery)
  • Heap Blocks: exact=912
8. 5.248 5.248 ↓ 11.8 1,112 1

Bitmap Index Scan on path_gist_idx (cost=0.00..12.98 rows=94 width=0) (actual time=5.248..5.248 rows=1,112 loops=1)

  • Index Cond: (path ~ '1.402.403.5261.40005.40006.40009.44636.*{1}'::lquery)
9. 3.336 3.336 ↑ 1.0 1 1,112

Index Scan using fs_node_pkey on fs_node u0 (cost=0.29..7.76 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1,112)

  • Index Cond: (id = fs_node.id)
  • Filter: (archived_at IS NULL)
  • Rows Removed by Filter: 0
10. 4.444 4.444 ↑ 1.0 1 1,111

Index Scan using fs_permission_node_id_access_right_81ac3a0e_uniq on fs_permission u1 (cost=0.42..0.68 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1,111)

  • Index Cond: ((node_id = u0.id) AND ((access_right)::text = 'view'::text))
11. 4.444 4.444 ↑ 1.0 1 1,111

Index Only Scan using fs_userpermission_user_id_permission_id_baa0e460_uniq on fs_userpermission u2 (cost=0.43..4.77 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1,111)

  • Index Cond: ((user_id = 6) AND (permission_id = u1.id))
  • Heap Fetches: 1111
12. 6.666 6.666 ↑ 1.0 6 1,111

Index Scan using fs_permission_node_id_638e8a2b on fs_permission (cost=0.42..0.74 rows=6 width=14) (actual time=0.004..0.006 rows=6 loops=1,111)

  • Index Cond: (node_id = u0.id)
13. 26.664 26.664 ↑ 1.0 1 6,666

Index Only Scan using fs_userpermission_user_id_permission_id_baa0e460_uniq on fs_userpermission (cost=0.43..1.41 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=6,666)

  • Index Cond: ((user_id = 6) AND (permission_id = fs_permission.id))
  • Heap Fetches: 6666
Planning time : 3.480 ms
Execution time : 61.334 ms