explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G481

Settings
# exclusive inclusive rows x rows loops node
1. 0.026 246,052.990 ↓ 0.0 0 1

ModifyTable on public.ci_job_artifacts (cost=166,786.91..167,406.92 rows=291,687,552 width=34) (actual time=246,052.990..246,052.990 rows=0 loops=1)

  • Buffers: shared hit=42,882 read=209,723 dirtied=7,338
  • I/O Timings: read=234,072.288
2.          

CTE ci_job_artifacts_with_row_number

3. 477.923 245,937.759 ↓ 1.3 114,457 1

WindowAgg (cost=0.42..164,740.73 rows=87,669 width=16) (actual time=3.329..245,937.759 rows=114,457 loops=1)

  • Buffers: shared hit=42,882 read=209,723 dirtied=7,338
  • I/O Timings: read=234,072.288
4. 245,459.836 245,459.836 ↓ 1.3 114,457 1

Index Scan using i1 on public.ci_job_artifacts ci_job_artifacts_1 (cost=0.42..163,206.52 rows=87,669 width=8) (actual time=3.244..245,459.836 rows=114,457 loops=1)

  • Filter: ((ci_job_artifacts_1.file_type = 101) OR ((ci_job_artifacts_1.file_type = 10) AND (ci_job_artifacts_1.job_id >= 121,896,538) AND (ci_job_artifacts_1.job_id < 156158378)))
  • Rows Removed by Filter: 138,454
  • Buffers: shared hit=42,882 read=209,723 dirtied=7,338
  • I/O Timings: read=234,072.288
5. 0.001 246,052.964 ↓ 0.0 0 1

Nested Loop (cost=2,046.19..2,666.19 rows=291,687,552 width=34) (actual time=246,052.964..246,052.964 rows=0 loops=1)

  • Buffers: shared hit=42,882 read=209,723 dirtied=7,338
  • I/O Timings: read=234,072.288
6. 0.006 246,052.963 ↓ 0.0 0 1

HashAggregate (cost=2,045.61..2,047.61 rows=200 width=32) (actual time=246,052.963..246,052.963 rows=0 loops=1)

  • Group Key: ci_job_artifacts_with_row_number.id
  • Buffers: shared hit=42,882 read=209,723 dirtied=7,338
  • I/O Timings: read=234,072.288
7. 246,052.957 246,052.957 ↓ 0.0 0 1

CTE Scan on ci_job_artifacts_with_row_number (cost=0.00..1,972.55 rows=29,223 width=32) (actual time=246,052.957..246,052.957 rows=0 loops=1)

  • Filter: (ci_job_artifacts_with_row_number.row_number > 1)
  • Rows Removed by Filter: 114,457
  • Buffers: shared hit=42,882 read=209,723 dirtied=7,338
  • I/O Timings: read=234,072.288
8. 0.000 0.000 ↓ 0.0 0 0

Index Scan using ci_job_artifacts_pkey on public.ci_job_artifacts (cost=0.57..3.59 rows=1 width=10) (actual time=0.000..0.000 rows=0 loops=0)

  • Index Cond: (ci_job_artifacts.id = ci_job_artifacts_with_row_number.id)