explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mE40

Settings
# exclusive inclusive rows x rows loops node
1. 1.625 57.374 ↓ 1,111.0 6,666 1

Nested Loop (cost=1,651.78..3,360.75 rows=6 width=10) (actual time=20.535..57.374 rows=6,666 loops=1)

2. 2.604 29.085 ↓ 12.1 6,666 1

Nested Loop (cost=1,651.34..2,430.12 rows=552 width=14) (actual time=20.527..29.085 rows=6,666 loops=1)

3. 1.241 20.926 ↓ 12.1 1,111 1

HashAggregate (cost=1,650.92..1,651.84 rows=92 width=8) (actual time=20.515..20.926 rows=1,111 loops=1)

  • Group Key: u0.id
4. 1.469 19.685 ↓ 11.9 1,111 1

Nested Loop (cost=13.87..1,650.69 rows=93 width=8) (actual time=5.495..19.685 rows=1,111 loops=1)

5. 1.586 13.772 ↓ 11.6 1,111 1

Nested Loop (cost=13.43..1,111.33 rows=96 width=12) (actual time=5.470..13.772 rows=1,111 loops=1)

6. 2.565 7.742 ↓ 12.1 1,111 1

Bitmap Heap Scan on fs_node u0 (cost=13.01..342.39 rows=92 width=4) (actual time=5.433..7.742 rows=1,111 loops=1)

  • Recheck Cond: (path ~ '1.402.403.5261.40005.40006.40009.44636.*{1}'::lquery)
  • Filter: (archived_at IS NULL)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=912
7. 5.177 5.177 ↓ 11.8 1,112 1

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

  • Index Cond: (path ~ '1.402.403.5261.40005.40006.40009.44636.*{1}'::lquery)
8. 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..8.36 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))
9. 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..5.62 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1,111)

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

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

  • Index Cond: (node_id = u0.id)
11. 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.69 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=6,666)

  • Index Cond: ((user_id = 4727) AND (permission_id = fs_permission.id))
  • Heap Fetches: 6666
Planning time : 2.229 ms
Execution time : 58.008 ms