explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IDbs

Settings
# exclusive inclusive rows x rows loops node
1. 0.035 1.690 ↓ 17.4 87 1

Subquery Scan on members (cost=25.96..26.05 rows=5 width=168) (actual time=1.621..1.690 rows=87 loops=1)

  • Buffers: shared hit=838
2. 0.029 1.655 ↓ 17.4 87 1

Unique (cost=25.96..26.00 rows=5 width=172) (actual time=1.619..1.655 rows=87 loops=1)

  • Buffers: shared hit=838
3. 0.097 1.626 ↓ 17.4 87 1

Sort (cost=25.96..25.97 rows=5 width=172) (actual time=1.618..1.626 rows=87 loops=1)

  • Sort Key: members_1.user_id, members_1.invite_email, (CASE WHEN ((members_1.type)::text = 'ProjectMember'::text) THEN 278964 WHEN ((members_1.type)::text = 'GroupMember'::text) THEN 2 ELSE 3 END)
  • Sort Method: quicksort Memory: 37kB
  • Buffers: shared hit=838
4. 0.112 1.529 ↓ 17.4 87 1

Nested Loop Left Join (cost=1.56..25.90 rows=5 width=172) (actual time=0.119..1.529 rows=87 loops=1)

  • Buffers: shared hit=838
5. 0.086 0.808 ↓ 17.4 87 1

Nested Loop Left Join (cost=0.99..21.55 rows=5 width=172) (actual time=0.092..0.808 rows=87 loops=1)

  • Buffers: shared hit=436
6. 0.016 0.200 ↓ 17.4 87 1

Append (cost=0.56..10.30 rows=5 width=168) (actual time=0.071..0.200 rows=87 loops=1)

  • Buffers: shared hit=88
7. 0.036 0.036 ↓ 0.0 0 1

Index Scan using index_members_on_source_id_and_source_type on public.members members_1 (cost=0.56..3.59 rows=1 width=168) (actual time=0.035..0.036 rows=0 loops=1)

  • Index Cond: ((members_1.source_id = 22) AND ((members_1.source_type)::text = 'Namespace'::text))
  • Filter: ((members_1.requested_at IS NULL) AND (members_1.invite_token IS NULL) AND (members_1.access_level > 5) AND ((members_1.type)::text = 'GroupMember'::text))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=4
8. 0.148 0.148 ↓ 21.8 87 1

Index Scan using index_non_requested_project_members_on_source_id_and_type on public.members members_2 (cost=0.56..6.64 rows=4 width=168) (actual time=0.034..0.148 rows=87 loops=1)

  • Index Cond: ((members_2.source_id = 278,964) AND ((members_2.source_type)::text = 'Project'::text))
  • Buffers: shared hit=84
9. 0.522 0.522 ↑ 1.0 1 87

Index Only Scan using users_pkey on public.users (cost=0.43..2.25 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=87)

  • Index Cond: (users.id = members_1.user_id)
  • Heap Fetches: 17
  • Buffers: shared hit=348
10. 0.609 0.609 ↑ 1.0 1 87

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on public.project_authorizations (cost=0.57..0.86 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=87)

  • Index Cond: ((project_authorizations.user_id = users.id) AND (project_authorizations.project_id = 278,964))
  • Heap Fetches: 11
  • Buffers: shared hit=402