explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vmiU

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 723.334 ↑ 1.0 100 1

Limit (cost=981,812.20..981,812.45 rows=100 width=770) (actual time=723.303..723.334 rows=100 loops=1)

  • Buffers: shared hit=638,735 read=1
  • I/O Timings: read=3.518
2. 36.051 723.314 ↑ 5.1 100 1

Sort (cost=981,812.20..981,813.49 rows=513 width=770) (actual time=723.300..723.314 rows=100 loops=1)

  • Sort Key: merge_requests.id DESC
  • Sort Method: top-N heapsort Memory: 285kB
  • Buffers: shared hit=638,735 read=1
  • I/O Timings: read=3.518
3. 14.420 687.263 ↓ 40.8 20,951 1

Nested Loop Semi Join (cost=1.99..981,792.60 rows=513 width=770) (actual time=65.902..687.263 rows=20,951 loops=1)

  • Buffers: shared hit=638,735 read=1
  • I/O Timings: read=3.518
4. 139.817 139.817 ↓ 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.100..139.817 rows=41,002 loops=1)

  • Index Cond: (merge_requests.target_project_id = 278,964)
  • Buffers: shared hit=41,157
5. 40.102 533.026 ↑ 10.0 1 41,002

Nested Loop (cost=1.43..23.26 rows=10 width=4) (actual time=0.013..0.013 rows=1 loops=41,002)

  • Buffers: shared hit=597,578 read=1
  • I/O Timings: read=3.518
6. 27.048 451.022 ↑ 10.0 1 41,002

Nested Loop (cost=1.00..18.81 rows=10 width=8) (actual time=0.011..0.011 rows=1 loops=41,002)

  • Buffers: shared hit=534,724 read=1
  • I/O Timings: read=3.518
7. 205.010 205.010 ↑ 8.5 2 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.005 rows=2 loops=41,002)

  • Index Cond: (deployment_merge_requests.merge_request_id = merge_requests.id)
  • Buffers: shared hit=169,782 read=1
  • I/O Timings: read=3.518
8. 218.964 218.964 ↓ 0.0 0 72,988

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

  • Index Cond: (deployments.id = deployment_merge_requests.deployment_id)
  • Filter: (deployments.finished_at < '2021-01-01 00:00:00+00'::timestamp with time zone)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=364,942
9. 41.902 41.902 ↑ 1.0 1 20,951

Index Only Scan using environments_pkey on public.environments (cost=0.43..0.45 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=20,951)

  • Index Cond: (environments.id = deployments.environment_id)
  • Heap Fetches: 0
  • Buffers: shared hit=62,854