explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 93iwI

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1,299.848 ↑ 14.3 7 1

Limit (cost=1,113,002.09..1,113,002.34 rows=100 width=770) (actual time=1,299.845..1,299.848 rows=7 loops=1)

  • Buffers: shared hit=1,456,272
2. 0.048 1,299.846 ↑ 47.1 7 1

Sort (cost=1,113,002.09..1,113,002.91 rows=330 width=770) (actual time=1,299.844..1,299.846 rows=7 loops=1)

  • Sort Key: merge_requests.id DESC
  • Sort Method: quicksort Memory: 32kB
  • Buffers: shared hit=1,456,272
3. 3.088 1,299.798 ↑ 47.1 7 1

Nested Loop Semi Join (cost=1.99..1,112,989.48 rows=330 width=770) (actual time=420.975..1,299.798 rows=7 loops=1)

  • Buffers: shared hit=1,456,272
4. 107.652 107.652 ↓ 1.0 41,002 1

Index Scan using index_merge_requests_on_target_project_id_and_iid on public.merge_requests (cost=0.56..51,748.07 rows=40,200 width=770) (actual time=0.047..107.652 rows=41,002 loops=1)

  • Index Cond: (merge_requests.target_project_id = 278,964)
  • Buffers: shared hit=41,157
5. 14.380 1,189.058 ↓ 0.0 0 41,002

Nested Loop (cost=1.43..26.39 rows=1 width=4) (actual time=0.029..0.029 rows=0 loops=41,002)

  • Buffers: shared hit=1,415,115
6. 137.386 779.038 ↑ 5.7 3 41,002

Nested Loop (cost=1.00..18.77 rows=17 width=8) (actual time=0.007..0.019 rows=3 loops=41,002)

  • Buffers: shared hit=887,595
7. 246.012 246.012 ↑ 5.7 3 41,002

Index Scan using index_deployment_merge_requests_on_merge_request_id on public.deployment_merge_requests (cost=0.43..4.32 rows=17 width=8) (actual time=0.004..0.006 rows=3 loops=41,002)

  • Index Cond: (deployment_merge_requests.merge_request_id = merge_requests.id)
  • Buffers: shared hit=228,192
8. 395.640 395.640 ↑ 1.0 1 131,880

Index Scan using deployments_pkey on public.deployments (cost=0.57..0.85 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=131,880)

  • Index Cond: (deployments.id = deployment_merge_requests.deployment_id)
  • Buffers: shared hit=659,403
9. 395.640 395.640 ↓ 0.0 0 131,880

Index Scan using environments_pkey on public.environments (cost=0.43..0.45 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=131,880)

  • Index Cond: (environments.id = deployments.environment_id)
  • Filter: ((environments.name)::text = 'staging'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=527,520