explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SwYt

Settings
# exclusive inclusive rows x rows loops node
1. 0.062 17.761 ↓ 64.0 64 1

Aggregate (cost=25.75..25.77 rows=1 width=723) (actual time=17.704..17.761 rows=64 loops=1)

  • Group Key: merge_requests.id
  • Filter: (count(users.id) = 1)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=866 read=246
  • I/O Timings: read=15.020
2. 0.251 17.699 ↓ 64.0 64 1

Sort (cost=25.75..25.75 rows=1 width=727) (actual time=17.687..17.699 rows=64 loops=1)

  • Sort Key: merge_requests.id
  • Sort Method: quicksort Memory: 121kB
  • Buffers: shared hit=866 read=246
  • I/O Timings: read=15.020
3. 0.127 17.448 ↓ 64.0 64 1

Nested Loop Left Join (cost=2.30..25.74 rows=1 width=727) (actual time=1.350..17.448 rows=64 loops=1)

  • Filter: ((project_features.merge_requests_access_level > 0) OR (project_features.merge_requests_access_level IS NULL))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=863 read=246
  • I/O Timings: read=15.020
4. 0.123 15.529 ↓ 64.0 64 1

Nested Loop (cost=1.86..23.63 rows=1 width=731) (actual time=1.192..15.529 rows=64 loops=1)

  • Buffers: shared hit=631 read=222
  • I/O Timings: read=13.499
5. 0.068 10.606 ↓ 64.0 64 1

Nested Loop (cost=1.43..16.93 rows=1 width=727) (actual time=0.763..10.606 rows=64 loops=1)

  • Buffers: shared hit=144 read=186
  • I/O Timings: read=9.373
6. 0.018 0.554 ↓ 64.0 64 1

Nested Loop (cost=0.86..14.39 rows=1 width=8) (actual time=0.518..0.554 rows=64 loops=1)

  • Buffers: shared hit=2 read=6
  • I/O Timings: read=0.350
7. 0.403 0.403 ↑ 1.0 1 1

Index Scan using index_users_on_username on public.users (cost=0.43..4.45 rows=1 width=4) (actual time=0.402..0.403 rows=1 loops=1)

  • Index Cond: ((users.username)::text = 'brodock'::text)
  • Buffers: shared read=4
  • I/O Timings: read=0.304
8. 0.133 0.133 ↑ 1.3 64 1

Index Only Scan using index_approvals_on_user_id_and_merge_request_id on public.approvals (cost=0.43..9.10 rows=84 width=8) (actual time=0.108..0.133 rows=64 loops=1)

  • Index Cond: (approvals.user_id = users.id)
  • Heap Fetches: 0
  • Buffers: shared hit=2 read=2
  • I/O Timings: read=0.046
9. 9.984 9.984 ↑ 1.0 1 64

Index Scan using merge_requests_pkey on public.merge_requests (cost=0.56..2.54 rows=1 width=723) (actual time=0.155..0.156 rows=1 loops=64)

  • Index Cond: (merge_requests.id = approvals.merge_request_id)
  • Buffers: shared hit=142 read=180
  • I/O Timings: read=9.023
10. 4.096 4.800 ↑ 1.0 1 64

Index Scan using projects_pkey on public.projects (cost=0.43..6.69 rows=1 width=4) (actual time=0.075..0.075 rows=1 loops=64)

  • Index Cond: (projects.id = merge_requests.target_project_id)
  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (projects.visibility_level = ANY ('{0,10,20}'::integer[])))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=487 read=36
  • I/O Timings: read=4.126
11.          

SubPlan (for Index Scan)

12. 0.704 0.704 ↑ 1.0 1 64

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on public.project_authorizations (cost=0.56..4.58 rows=1 width=0) (actual time=0.011..0.011 rows=1 loops=64)

  • Index Cond: ((project_authorizations.user_id = 1) AND (project_authorizations.project_id = projects.id))
  • Heap Fetches: 0
  • Buffers: shared hit=257 read=10
  • I/O Timings: read=0.444
13. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on public.project_authorizations project_authorizations_1 (cost=0.56..53.67 rows=174 width=4) (actual time=0.000..0.000 rows=0 loops=0)

  • Index Cond: (project_authorizations_1.user_id = 1)
  • Heap Fetches: 0
14. 1.792 1.792 ↑ 1.0 1 64

Index Scan using index_project_features_on_project_id on public.project_features (cost=0.43..2.09 rows=1 width=8) (actual time=0.028..0.028 rows=1 loops=64)

  • Index Cond: (projects.id = project_features.project_id)
  • Buffers: shared hit=232 read=24
  • I/O Timings: read=1.521