explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Uq9

Settings
# exclusive inclusive rows x rows loops node
1. 18.646 70.545 ↓ 1.4 625 1

HashAggregate (cost=9,640.94..9,645.30 rows=436 width=2,946) (actual time=69.666..70.545 rows=625 loops=1)

  • Group Key: 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.ldap_sync_status, namespaces.ldap_sync_error, namespaces.ldap_sync_last_update_at, namespaces.ldap_sync_last_successful_update_at, namespaces.ldap_sync_last_sync_at, namespaces.lfs_enabled, namespaces.description_html, namespaces.parent_id, namespaces.shared_runners_minutes_limit, namespaces.repository_size_limit, namespaces.require_two_factor_authentication, namespaces.two_factor_grace_period, namespaces.cached_markdown_version, namespaces.project_creation_level, namespaces.runners_token, namespaces.file_template_project_id, namespaces.saml_discovery_token, namespaces.runners_token_encrypted, namespaces.custom_project_templates_group_id, namespaces.auto_devops_enabled, namespaces.extra_shared_runners_minutes_limit, namespaces.last_ci_minutes_notification_at, namespaces.last_ci_minutes_usage_notification_level, namespaces.subgroup_creation_level, namespaces.emails_disabled, namespaces.max_pages_size, namespaces.max_artifacts_size, namespaces.mentions_disabled, namespaces.default_branch_protection, namespaces.unlock_membership_to_ldap, namespaces.max_personal_access_token_lifetime, namespaces.push_rule_id, namespaces.shared_runners_enabled, namespaces.allow_descendants_override_disabled_shared_runners, namespaces.traversal_ids, namespaces.delayed_project_removal
  • Buffers: shared hit=35,994 read=3
  • I/O Timings: read=5.495
2. 0.775 51.899 ↓ 9.3 4,052 1

Append (cost=0.87..9,587.53 rows=436 width=2,946) (actual time=0.046..51.899 rows=4,052 loops=1)

  • Buffers: shared hit=35,994 read=3
  • I/O Timings: read=5.495
3. 0.034 0.648 ↓ 46.0 46 1

Nested Loop (cost=0.87..22.62 rows=1 width=346) (actual time=0.046..0.648 rows=46 loops=1)

  • Buffers: shared hit=336
4. 0.292 0.292 ↓ 46.0 46 1

Index Scan using index_members_on_user_id on public.members (cost=0.44..19.17 rows=1 width=4) (actual time=0.028..0.292 rows=46 loops=1)

  • Index Cond: (members.user_id = 1)
  • Filter: ((members.requested_at IS NULL) AND (members.access_level >= 10) AND ((members.type)::text = 'GroupMember'::text) AND ((members.source_type)::text = 'Namespace'::text))
  • Rows Removed by Filter: 111
  • Buffers: shared hit=152
5. 0.322 0.322 ↑ 1.0 1 46

Index Scan using namespaces_pkey on public.namespaces (cost=0.43..3.46 rows=1 width=346) (actual time=0.007..0.007 rows=1 loops=46)

  • Index Cond: (namespaces.id = members.source_id)
  • Filter: ((namespaces.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=184
6. 0.001 5.603 ↓ 0.0 0 1

Nested Loop (cost=0.87..6.67 rows=1 width=346) (actual time=5.603..5.603 rows=0 loops=1)

  • Buffers: shared read=3
  • I/O Timings: read=5.495
7. 5.602 5.602 ↓ 0.0 0 1

Index Scan using index_members_on_access_level on public.members members_1 (cost=0.44..3.22 rows=1 width=4) (actual time=5.602..5.602 rows=0 loops=1)

  • Index Cond: (members_1.access_level = 5)
  • Filter: (((members_1.type)::text = 'GroupMember'::text) AND ((members_1.source_type)::text = 'Namespace'::text) AND (members_1.user_id = 1))
  • Rows Removed by Filter: 0
  • Buffers: shared read=3
  • I/O Timings: read=5.495
8. 0.000 0.000 ↓ 0.0 0 0

Index Scan using namespaces_pkey on public.namespaces namespaces_1 (cost=0.43..3.46 rows=1 width=346) (actual time=0.000..0.000 rows=0 loops=0)

  • Index Cond: (namespaces_1.id = members_1.source_id)
  • Filter: ((namespaces_1.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
9. 3.638 44.873 ↓ 9.2 4,006 1

Nested Loop (cost=1.44..9,551.69 rows=434 width=346) (actual time=0.279..44.873 rows=4,006 loops=1)

  • Buffers: shared hit=35,658
10. 4.855 24.619 ↓ 1.9 4,154 1

Nested Loop (cost=1.01..8,477.03 rows=2,243 width=4) (actual time=0.093..24.619 rows=4,154 loops=1)

  • Buffers: shared hit=18,993
11. 3.148 3.148 ↓ 1.9 4,154 1

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on public.project_authorizations (cost=0.57..823.07 rows=2,243 width=4) (actual time=0.063..3.148 rows=4,154 loops=1)

  • Index Cond: (project_authorizations.user_id = 1)
  • Heap Fetches: 942
  • Buffers: shared hit=2,373
12. 16.616 16.616 ↑ 1.0 1 4,154

Index Scan using projects_pkey on public.projects (cost=0.43..3.41 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=4,154)

  • Index Cond: (projects.id = project_authorizations.project_id)
  • Buffers: shared hit=16,620
13. 16.616 16.616 ↑ 1.0 1 4,154

Index Scan using namespaces_pkey on public.namespaces namespaces_2 (cost=0.43..0.48 rows=1 width=346) (actual time=0.004..0.004 rows=1 loops=4,154)

  • Index Cond: (namespaces_2.id = projects.namespace_id)
  • Filter: ((namespaces_2.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=16,665