explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gs6e

Settings
# exclusive inclusive rows x rows loops node
1. 860.482 7,901.100 ↓ 0.0 0 1

ModifyTable on public.merge_request_metrics (cost=8,118.95..43,654.19 rows=10,042 width=182) (actual time=7,901.100..7,901.100 rows=0 loops=1)

  • Buffers: shared hit=398,877 read=5,105 dirtied=984
  • I/O Timings: read=6,871.596
2.          

CTE merge_requests_batch

3. 6,330.015 6,330.015 ↑ 1.0 10,002 1

Index Scan using merge_requests_pkey on public.merge_requests (cost=0.56..8,118.38 rows=10,042 width=8) (actual time=0.022..6,330.015 rows=10,002 loops=1)

  • Index Cond: ((merge_requests.id >= 13,631) AND (merge_requests.id <= 25,866))
  • Buffers: shared hit=1,950 read=4,232 dirtied=117
  • I/O Timings: read=6,246.502
4. 39.575 7,040.618 ↑ 1.0 10,002 1

Nested Loop (cost=0.56..35,535.81 rows=10,042 width=182) (actual time=0.091..7,040.618 rows=10,002 loops=1)

  • Buffers: shared hit=51,646 read=4,601 dirtied=119
  • I/O Timings: read=6,699.136
5. 6,370.917 6,370.917 ↑ 1.0 10,002 1

CTE Scan on merge_requests_batch (cost=0.00..200.84 rows=10,042 width=40) (actual time=0.062..6,370.917 rows=10,002 loops=1)

  • Buffers: shared hit=1,950 read=4,232 dirtied=117
  • I/O Timings: read=6,246.502
6. 630.126 630.126 ↑ 1.0 1 10,002

Index Scan using unique_merge_request_metrics_by_merge_request_id on public.merge_request_metrics (cost=0.56..3.52 rows=1 width=146) (actual time=0.063..0.063 rows=1 loops=10,002)

  • Index Cond: (merge_request_metrics.merge_request_id = merge_requests_batch.id)
  • Buffers: shared hit=49,696 read=369 dirtied=2
  • I/O Timings: read=452.634