explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ke8d : 12321312

Settings
# exclusive inclusive rows x rows loops node
1. 0.068 1.547 ↓ 17.0 17 1

Unique (cost=112.93..113.15 rows=1 width=2,422) (actual time=1.476..1.547 rows=17 loops=1)

2. 1.108 1.479 ↓ 38.0 38 1

Sort (cost=112.93..112.94 rows=1 width=2,422) (actual time=1.476..1.479 rows=38 loops=1)

  • Sort Key: users.id, users.email, users.encrypted_password, users.reset_password_token, users.reset_password_sent_at, users.remember_created_at, users.sign_in_count, users.current_sign_in_at, users.last_sign_in_at, users.current_sign_in_ip, users.last_sign_in_ip, users.created_at, users.updated_at, users.name, users.admin, users.projects_limit, users.skype, users.linkedin, users.twitter, users.bio, users.failed_attempts, users.locked_at, users.username, users.can_create_group, users.can_create_team, users.state, users.color_scheme_id, users.password_expires_at, users.created_by_id, users.last_credential_check_at, users.avatar, users.confirmation_token, users.confirmed_at, users.confirmation_sent_at, users.unconfirmed_email, users.hide_no_ssh_key, users.website_url, users.admin_email_unsubscribed_at, users.notification_email, users.hide_no_password, users.password_automatically_set, users.location, users.encrypted_otp_secret, users.encrypted_otp_secret_iv, users.encrypted_otp_secret_salt, users.otp_required_for_login, users.otp_backup_codes, users.public_email, users.dashboard, users.project_view, users.consumed_timestep, users.layout, users.hide_project_limit, users.note, users.unlock_token, users.otp_grace_period_started_at, users.external, users.incoming_email_token, users.organization, users.auditor, users.require_two_factor_authentication_from_group, users.two_factor_grace_period, users.ghost, users.last_activity_on, users.notified_of_own_activity, users.preferred_language, users.email_opted_in, users.email_opted_in_ip, users.email_opted_in_source_id, users.email_opted_in_at, users.theme_id, users.accepted_term_id, users.feed_token, users.private_profile, users.roadmap_layout, users.include_private_contributions, users.commit_email, users.group_view, users.managing_group_id, users.bot_type, users.first_name, users.last_name, users.static_object_token, users.role
  • Sort Method: quicksort Memory: 44kB
3. 0.028 0.371 ↓ 38.0 38 1

Nested Loop (cost=103.97..112.92 rows=1 width=2,422) (actual time=0.243..0.371 rows=38 loops=1)

4. 0.010 0.267 ↓ 38.0 38 1

Nested Loop (cost=103.68..110.62 rows=1 width=4) (actual time=0.222..0.267 rows=38 loops=1)

5. 0.016 0.202 ↓ 3.7 11 1

HashAggregate (cost=103.40..103.43 rows=3 width=8) (actual time=0.199..0.202 rows=11 loops=1)

  • Group Key: namespaces.id
6. 0.031 0.186 ↓ 3.7 11 1

Hash Join (cost=33.04..103.39 rows=3 width=8) (actual time=0.171..0.186 rows=11 loops=1)

  • Hash Cond: ((unnest(issue_user_mentions.mentioned_groups_ids)) = namespaces.id)
7. 0.027 0.100 ↑ 254.5 11 1

HashAggregate (cost=29.55..64.55 rows=2,800 width=4) (actual time=0.088..0.100 rows=11 loops=1)

  • Group Key: unnest(issue_user_mentions.mentioned_groups_ids)
8. 0.022 0.073 ↑ 60.3 58 1

ProjectSet (cost=0.42..20.80 rows=3,500 width=4) (actual time=0.048..0.073 rows=58 loops=1)

9. 0.051 0.051 ↓ 1.1 40 1

Index Scan using index_issue_user_mentions_on_issue_id on issue_user_mentions (cost=0.42..3.04 rows=35 width=27) (actual time=0.037..0.051 rows=40 loops=1)

  • Index Cond: (issue_id = 3937)
10. 0.020 0.055 ↑ 1.0 12 1

Hash (cost=3.34..3.34 rows=12 width=4) (actual time=0.055..0.055 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.035 0.035 ↑ 1.0 12 1

Index Scan using index_namespaces_on_type_partial on namespaces (cost=0.14..3.34 rows=12 width=4) (actual time=0.022..0.035 rows=12 loops=1)

  • Index Cond: ((type)::text = 'Group'::text)
12. 0.055 0.055 ↓ 3.0 3 11

Index Scan using index_members_on_source_id_and_source_type on members (cost=0.28..2.39 rows=1 width=8) (actual time=0.004..0.005 rows=3 loops=11)

  • Index Cond: ((source_id = namespaces.id) AND ((source_type)::text = 'Namespace'::text))
  • Filter: ((requested_at IS NULL) AND ((type)::text = 'GroupMember'::text))
13. 0.076 0.076 ↑ 1.0 1 38

Index Scan using users_pkey on users (cost=0.29..2.31 rows=1 width=2,422) (actual time=0.002..0.002 rows=1 loops=38)

  • Index Cond: (id = members.user_id)
Planning time : 15.353 ms
Execution time : 5.117 ms