explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iyaR

Settings
# exclusive inclusive rows x rows loops node
1. 552.310 4,334.819 ↓ 0.0 0 1

ModifyTable on public.merge_request_metrics (cost=3,999.38..21,649.97 rows=4,943 width=182) (actual time=4,334.819..4,334.819 rows=0 loops=1)

  • Buffers: shared hit=199,691 read=2,424 dirtied=473
  • I/O Timings: read=3,662.974
2.          

CTE merge_requests_batch

3. 3,397.555 3,397.555 ↓ 1.0 5,002 1

Index Scan using merge_requests_pkey on public.merge_requests (cost=0.56..3,998.81 rows=4,943 width=8) (actual time=0.041..3,397.555 rows=5,002 loops=1)

  • Index Cond: ((merge_requests.id >= 27,079) AND (merge_requests.id <= 33,101))
  • Buffers: shared hit=1,061 read=1,992 dirtied=22
  • I/O Timings: read=3,342.109
4. 33.922 3,782.509 ↓ 1.0 5,002 1

Nested Loop (cost=0.56..17,651.16 rows=4,943 width=182) (actual time=0.115..3,782.509 rows=5,002 loops=1)

  • Buffers: shared hit=25,913 read=2,178 dirtied=27
  • I/O Timings: read=3,582.729
5. 3,423.457 3,423.457 ↓ 1.0 5,002 1

CTE Scan on merge_requests_batch (cost=0.00..98.86 rows=4,943 width=40) (actual time=0.053..3,423.457 rows=5,002 loops=1)

  • Buffers: shared hit=1,061 read=1,992 dirtied=22
  • I/O Timings: read=3,342.109
6. 325.130 325.130 ↑ 1.0 1 5,002

Index Scan using unique_merge_request_metrics_by_merge_request_id on public.merge_request_metrics (cost=0.56..3.55 rows=1 width=146) (actual time=0.065..0.065 rows=1 loops=5,002)

  • Index Cond: (merge_request_metrics.merge_request_id = merge_requests_batch.id)
  • Buffers: shared hit=24,852 read=186 dirtied=5
  • I/O Timings: read=240.620