explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qXFV

Settings
# exclusive inclusive rows x rows loops node
1. 3.184 212.569 ↓ 30.0 16,665 1

Nested Loop (cost=1,658.59..3,637.08 rows=556 width=34) (actual time=33.837..212.569 rows=16,665 loops=1)

2. 1.809 42.735 ↓ 12.1 6,666 1

Nested Loop (cost=1,658.15..2,436.93 rows=552 width=14) (actual time=33.821..42.735 rows=6,666 loops=1)

3. 2.353 34.260 ↓ 12.1 1,111 1

HashAggregate (cost=1,657.73..1,658.65 rows=92 width=8) (actual time=33.810..34.260 rows=1,111 loops=1)

  • Group Key: u0.id
4. 1.740 31.907 ↓ 34.4 3,333 1

Nested Loop (cost=13.87..1,657.49 rows=97 width=8) (actual time=6.074..31.907 rows=3,333 loops=1)

5. 0.733 14.613 ↓ 11.6 1,111 1

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

6. 2.579 8.325 ↓ 12.1 1,111 1

Bitmap Heap Scan on fs_node u0 (cost=13.01..342.39 rows=92 width=4) (actual time=6.003..8.325 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.746 5.746 ↓ 11.8 1,112 1

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

  • Index Cond: (path ~ '1.402.403.5261.40005.40006.40009.44636.*{1}'::lquery)
8. 5.555 5.555 ↑ 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.005..0.005 rows=1 loops=1,111)

  • Index Cond: ((node_id = u0.id) AND ((access_right)::text = 'view'::text))
9. 15.554 15.554 ↓ 3.0 3 1,111

Index Only Scan using fs_userpermission_user_id_permission_id_baa0e460_uniq on fs_userpermission u2 (cost=0.43..5.68 rows=1 width=4) (actual time=0.005..0.014 rows=3 loops=1,111)

  • Index Cond: ((user_id = ANY ('{6,1234,1239}'::integer[])) AND (permission_id = u1.id))
  • Heap Fetches: 3333
10. 6.666 6.666 ↑ 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.006 rows=6 loops=1,111)

  • Index Cond: (node_id = u0.id)
11. 166.650 166.650 ↓ 2.0 2 6,666

Index Scan using fs_userpermission_permission_id_5755f64c on fs_userpermission (cost=0.43..2.16 rows=1 width=20) (actual time=0.004..0.025 rows=2 loops=6,666)

  • Index Cond: (permission_id = fs_permission.id)
  • Filter: (user_id = ANY ('{6,1234,1239}'::integer[]))
  • Rows Removed by Filter: 28
Planning time : 2.226 ms
Execution time : 213.832 ms