explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EG3e

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1.493 ↓ 0.0 0 1

Limit (cost=963.86..994.52 rows=1 width=4) (actual time=1.489..1.493 rows=0 loops=1)

2. 0.114 1.492 ↓ 0.0 0 1

Nested Loop Anti Join (cost=963.86..1,485.00 rows=17 width=4) (actual time=1.488..1.492 rows=0 loops=1)

3. 0.027 0.468 ↑ 4.0 182 1

Nested Loop (cost=963.43..1,141.69 rows=737 width=4) (actual time=0.238..0.468 rows=182 loops=1)

4. 0.011 0.213 ↑ 6.8 12 1

HashAggregate (cost=963.00..963.81 rows=81 width=4) (actual time=0.207..0.213 rows=12 loops=1)

  • Group Key: namespaces.id
5. 0.202 0.202 ↑ 6.8 12 1

CTE Scan on base_and_descendants namespaces (cost=960.37..961.99 rows=81 width=4) (actual time=0.055..0.202 rows=12 loops=1)

6.          

CTE base_and_descendants

7. 0.040 0.187 ↑ 6.8 12 1

Recursive Union (cost=0.42..960.37 rows=81 width=344) (actual time=0.052..0.187 rows=12 loops=1)

8. 0.039 0.039 ↑ 1.0 1 1

Index Scan using index_namespaces_on_type_and_id_partial on namespaces namespaces_1 (cost=0.42..3.44 rows=1 width=344) (actual time=0.038..0.039 rows=1 loops=1)

  • Index Cond: (((type)::text = 'Group'::text) AND (id = 9,970))
9. 0.009 0.108 ↑ 2.0 4 3

Nested Loop (cost=0.43..95.53 rows=8 width=344) (actual time=0.019..0.036 rows=4 loops=3)

10. 0.003 0.003 ↑ 2.5 4 3

WorkTable Scan on base_and_descendants (cost=0.00..0.20 rows=10 width=4) (actual time=0.000..0.001 rows=4 loops=3)

11. 0.096 0.096 ↑ 1.0 1 12

Index Scan using index_namespaces_on_parent_id_and_id on namespaces namespaces_2 (cost=0.43..9.52 rows=1 width=344) (actual time=0.006..0.008 rows=1 loops=12)

  • Index Cond: (parent_id = base_and_descendants.id)
  • Filter: ((type)::text = 'Group'::text)
12. 0.228 0.228 ↓ 1.7 15 12

Index Only Scan using index_projects_on_namespace_id_and_id on projects (cost=0.43..2.11 rows=9 width=8) (actual time=0.010..0.019 rows=15 loops=12)

  • Index Cond: (namespace_id = namespaces.id)
  • Heap Fetches: 14
13. 0.910 0.910 ↑ 1.0 1 182

Index Only Scan using index_project_pages_metadata_on_project_id on project_pages_metadata (cost=0.43..0.46 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=182)

  • Index Cond: (project_id = projects.id)
  • Heap Fetches: 32
Planning time : 1.503 ms
Execution time : 1.647 ms