explain.depesz.com

PostgreSQL's explain analyze made readable

Result: osra

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 2.837 ↓ 0.0 0 1

ModifyTable on public.ci_job_artifacts (cost=394.39..1,014.40 rows=291,687,552 width=34) (actual time=2.837..2.837 rows=0 loops=1)

  • Buffers: shared hit=304
2.          

CTE ci_job_artifacts_with_row_number

3. 1.144 2.420 ↑ 3.7 1,000 1

WindowAgg (cost=0.42..308.25 rows=3,667 width=16) (actual time=0.097..2.420 rows=1,000 loops=1)

  • Buffers: shared hit=304
4. 1.276 1.276 ↑ 3.7 1,000 1

Index Only Scan using i1 on public.ci_job_artifacts ci_job_artifacts_1 (cost=0.42..244.08 rows=3,667 width=8) (actual time=0.087..1.276 rows=1,000 loops=1)

  • Index Cond: ((ci_job_artifacts_1.job_id >= 173,998,826) AND (ci_job_artifacts_1.job_id < 186981289))
  • Heap Fetches: 19
  • Buffers: shared hit=304
5. 0.001 2.835 ↓ 0.0 0 1

Nested Loop (cost=86.14..706.15 rows=291,687,552 width=34) (actual time=2.835..2.835 rows=0 loops=1)

  • Buffers: shared hit=304
6. 0.002 2.834 ↓ 0.0 0 1

HashAggregate (cost=85.56..87.56 rows=200 width=32) (actual time=2.834..2.834 rows=0 loops=1)

  • Group Key: ci_job_artifacts_with_row_number.id
  • Buffers: shared hit=304
7. 2.832 2.832 ↓ 0.0 0 1

CTE Scan on ci_job_artifacts_with_row_number (cost=0.00..82.51 rows=1,222 width=32) (actual time=2.832..2.832 rows=0 loops=1)

  • Filter: (ci_job_artifacts_with_row_number.row_number > 1)
  • Rows Removed by Filter: 1,000
  • Buffers: shared hit=304
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)