explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CJtL

Settings
# exclusive inclusive rows x rows loops node
1. 0.107 2.891 ↓ 622.5 1,245 1

Append (cost=9.16..308.30 rows=2 width=491) (actual time=0.106..2.891 rows=1,245 loops=1)

2.          

CTE curr_usr

3. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.002..0.002 rows=1 loops=1)

4.          

CTE curr_container

5. 0.002 0.060 ↑ 1.0 1 1

Limit (cost=0.55..8.60 rows=1 width=33) (actual time=0.058..0.060 rows=1 loops=1)

6. 0.003 0.058 ↑ 1.0 1 1

Nested Loop (cost=0.55..8.60 rows=1 width=33) (actual time=0.057..0.058 rows=1 loops=1)

7. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on curr_usr u_2 (cost=0.00..0.02 rows=1 width=64) (actual time=0.000..0.001 rows=1 loops=1)

8. 0.054 0.054 ↑ 1.0 1 1

Index Scan using perm_idx_owner_system_is_deleted_scope_url on perm p_2 (cost=0.55..8.57 rows=1 width=179) (actual time=0.054..0.054 rows=1 loops=1)

  • Index Cond: ((owner_system = (u_2.owner_system)::text) AND (is_deleted = true) AND (lower(scope_url) = (lower(u_2.scope_url))::text))
  • Filter: is_deleted
9. 0.005 0.131 ↓ 2.0 2 1

Nested Loop (cost=0.55..49.67 rows=1 width=491) (actual time=0.105..0.131 rows=2 loops=1)

10. 0.007 0.007 ↑ 1.0 1 1

CTE Scan on curr_usr u (cost=0.00..0.02 rows=1 width=96) (actual time=0.006..0.007 rows=1 loops=1)

11. 0.119 0.119 ↓ 2.0 2 1

Index Scan using perm_idx_owner_system_is_deleted_scope_url on perm p (cost=0.55..49.64 rows=1 width=491) (actual time=0.094..0.119 rows=2 loops=1)

  • Index Cond: ((owner_system = (u.owner_system)::text) AND (is_deleted = false) AND (lower(scope_url) = ANY (u.parent_scope_urls)))
  • Filter: ((NOT is_deleted) AND (u.member_of && readers))
12. 0.185 2.653 ↓ 1,243.0 1,243 1

Nested Loop (cost=0.55..249.98 rows=1 width=491) (actual time=0.111..2.653 rows=1,243 loops=1)

13. 0.062 0.062 ↑ 1.0 1 1

CTE Scan on curr_container c (cost=0.00..0.02 rows=1 width=32) (actual time=0.060..0.062 rows=1 loops=1)

14. 0.217 2.406 ↓ 1,243.0 1,243 1

Nested Loop (cost=0.55..249.95 rows=1 width=491) (actual time=0.049..2.406 rows=1,243 loops=1)

15. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on curr_usr u_1 (cost=0.00..0.02 rows=1 width=64) (actual time=0.000..0.001 rows=1 loops=1)

16. 2.188 2.188 ↓ 1,243.0 1,243 1

Index Scan using perm_idx_owner_system_is_deleted_container on perm p_1 (cost=0.55..249.92 rows=1 width=491) (actual time=0.047..2.188 rows=1,243 loops=1)

  • Index Cond: ((owner_system = (u_1.owner_system)::text) AND (is_deleted = true) AND (container = c.container))
  • Filter: (is_deleted AND (readers && u_1.member_of))
Planning time : 0.873 ms