explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kPcR

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 1,273.386 ↓ 0.0 0 1

Hash Join (cost=3,469.32..3,584.86 rows=403 width=298) (actual time=1,273.386..1,273.386 rows=0 loops=1)

  • Output: project_registry.id, project_registry.project_id, project_registry.last_repository_synced_at, project_registry.last_repository_successful_sync_at, project_registry.created_at, project_registry.resync_repository, project_registry.resync_wiki, project_registry.last_wiki_synced_at, project_registry.last_wiki_successful_sync_at, project_registry.repositor
  • Hash Cond: (projects.namespace_id = gitlab_secondary_namespaces.id)
  • Buffers: shared hit=3
2. 34.712 1,272.682 ↑ 806.0 1 1

Hash Join (cost=104.42..208.88 rows=806 width=302) (actual time=1,272.682..1,272.682 rows=1 loops=1)

  • Output: project_registry.id, project_registry.project_id, project_registry.last_repository_synced_at, project_registry.last_repository_successful_sync_at, project_registry.created_at, project_registry.resync_repository, project_registry.resync_wiki, project_registry.last_wiki_synced_at, project_registry.last_wiki_successful_sync_at, project_registry.rep
  • Hash Cond: (projects.id = project_registry.project_id)
  • Buffers: shared hit=3
3. 1,237.905 1,237.905 ↓ 136.4 349,307 1

Foreign Scan on gitlab_secondary.projects (cost=100.00..186.80 rows=2,560 width=8) (actual time=1.371..1,237.905 rows=349,307 loops=1)

  • Output: projects.id, projects.name, projects.path, projects.description, projects.created_at, projects.updated_at, projects.creator_id, projects.namespace_id, projects.last_activity_at, projects.import_url, projects.visibility_level, projects.archived, projects.import_status, projects.merge_requests_template, projects.star_count, projects.merge_re
  • Remote SQL: SELECT id, namespace_id FROM public.projects
4. 0.023 0.065 ↑ 1.0 63 1

Hash (cost=3.63..3.63 rows=63 width=298) (actual time=0.065..0.065 rows=63 loops=1)

  • Output: project_registry.id, project_registry.project_id, project_registry.last_repository_synced_at, project_registry.last_repository_successful_sync_at, project_registry.created_at, project_registry.resync_repository, project_registry.resync_wiki, project_registry.last_wiki_synced_at, project_registry.last_wiki_successful_sync_at, project_regist
  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
  • Buffers: shared hit=3
5. 0.042 0.042 ↑ 1.0 63 1

Seq Scan on public.project_registry (cost=0.00..3.63 rows=63 width=298) (actual time=0.015..0.042 rows=63 loops=1)

  • Output: project_registry.id, project_registry.project_id, project_registry.last_repository_synced_at, project_registry.last_repository_successful_sync_at, project_registry.created_at, project_registry.resync_repository, project_registry.resync_wiki, project_registry.last_wiki_synced_at, project_registry.last_wiki_successful_sync_at, project_
  • Buffers: shared hit=3
6. 0.001 0.688 ↓ 0.0 0 1

Hash (cost=3,362.40..3,362.40 rows=200 width=4) (actual time=0.688..0.688 rows=0 loops=1)

  • Output: gitlab_secondary_namespaces.id
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
7. 0.004 0.687 ↓ 0.0 0 1

HashAggregate (cost=3,360.40..3,362.40 rows=200 width=4) (actual time=0.687..0.687 rows=0 loops=1)

  • Output: gitlab_secondary_namespaces.id
  • Group Key: gitlab_secondary_namespaces.id
8. 0.683 0.683 ↓ 0.0 0 1

CTE Scan on base_and_descendants gitlab_secondary_namespaces (cost=2,735.91..3,120.21 rows=19,215 width=4) (actual time=0.683..0.683 rows=0 loops=1)

  • Output: gitlab_secondary_namespaces.id
9.          

CTE base_and_descendants

10. 0.003 0.682 ↓ 0.0 0 1

Recursive Union (cost=100.00..2,735.91 rows=19,215 width=4) (actual time=0.682..0.682 rows=0 loops=1)

11. 0.671 0.671 ↓ 0.0 0 1

Foreign Scan on gitlab_secondary.geo_node_namespace_links (cost=100.00..146.86 rows=15 width=4) (actual time=0.671..0.671 rows=0 loops=1)

  • Output: geo_node_namespace_links.namespace_id
  • Remote SQL: SELECT namespace_id FROM public.geo_node_namespace_links WHERE ((geo_node_id = 2))
12. 0.006 0.008 ↓ 0.0 0 1

Hash Join (cost=104.88..220.47 rows=1,920 width=4) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: namespaces.id
  • Hash Cond: (namespaces.parent_id = base_and_descendants.id)
13. 0.000 0.000 ↓ 0.0 0

Foreign Scan on gitlab_secondary.namespaces (cost=100.00..186.80 rows=2,560 width=8) (never executed)

  • Output: namespaces.id, namespaces.name, namespaces.path, namespaces.owner_id, namespaces.created_at, namespaces.updated_at, namespaces.type, namespaces.description, namespaces.avatar, namespaces.membership_lock, namespaces.share_with_group_lock, namespaces.visibility_level, namespaces.request_access_enabled, namespaces.ld
  • Remote SQL: SELECT id, parent_id FROM public.namespaces
14. 0.000 0.002 ↓ 0.0 0 1

Hash (cost=3.00..3.00 rows=150 width=4) (actual time=0.002..0.002 rows=0 loops=1)

  • Output: base_and_descendants.id
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
15. 0.002 0.002 ↓ 0.0 0 1

WorkTable Scan on base_and_descendants (cost=0.00..3.00 rows=150 width=4) (actual time=0.002..0.002 rows=0 loops=1)

  • Output: base_and_descendants.id
Planning time : 0.499 ms
Execution time : 1,275.750 ms