explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0vh

Settings
# exclusive inclusive rows x rows loops node
1. 68.430 752.334 ↓ 0.0 0 1

ModifyTable on public.merge_request_metrics (cost=808.37..4,395.00 rows=997 width=182) (actual time=752.333..752.334 rows=0 loops=1)

  • Buffers: shared hit=40,293 read=491 dirtied=93
  • I/O Timings: read=659.892
2.          

CTE merge_requests_batch

3. 628.284 628.284 ↓ 1.0 1,002 1

Index Scan using merge_requests_pkey on public.merge_requests (cost=0.56..807.80 rows=997 width=8) (actual time=0.029..628.284 rows=1,002 loops=1)

  • Index Cond: ((merge_requests.id >= 25,866) AND (merge_requests.id <= 27,079))
  • Buffers: shared hit=219 read=420 dirtied=22
  • I/O Timings: read=616.756
4. 4.003 683.904 ↓ 1.0 1,002 1

Nested Loop (cost=0.56..3,587.19 rows=997 width=182) (actual time=0.066..683.904 rows=1,002 loops=1)

  • Buffers: shared hit=5,214 read=440 dirtied=23
  • I/O Timings: read=653.805
5. 631.805 631.805 ↓ 1.0 1,002 1

CTE Scan on merge_requests_batch (cost=0.00..19.94 rows=997 width=40) (actual time=0.039..631.805 rows=1,002 loops=1)

  • Buffers: shared hit=219 read=420 dirtied=22
  • I/O Timings: read=616.756
6. 48.096 48.096 ↑ 1.0 1 1,002

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

  • Index Cond: (merge_request_metrics.merge_request_id = merge_requests_batch.id)
  • Buffers: shared hit=4,995 read=20 dirtied=1
  • I/O Timings: read=37.049