explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n96k

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

ModifyTable on public.ci_job_artifacts (cost=84.22..573.90 rows=291,687,552 width=34) (actual time=2.356..2.357 rows=0 loops=1)

  • Buffers: shared hit=176
2.          

CTE ci_job_artifacts_with_row_number

3. 1.003 2.009 ↓ 1.3 1,000 1

WindowAgg (cost=0.42..65.65 rows=771 width=16) (actual time=0.101..2.009 rows=1,000 loops=1)

  • Buffers: shared hit=176
4. 1.006 1.006 ↓ 1.3 1,000 1

Index Only Scan using i1 on public.ci_job_artifacts ci_job_artifacts_1 (cost=0.42..52.16 rows=771 width=8) (actual time=0.091..1.006 rows=1,000 loops=1)

  • Index Cond: ((ci_job_artifacts_1.job_id >= 406,714,596) AND (ci_job_artifacts_1.job_id < 409207962))
  • Heap Fetches: 56
  • Buffers: shared hit=176
5. 0.001 2.355 ↓ 0.0 0 1

Nested Loop (cost=18.56..508.25 rows=291,687,552 width=34) (actual time=2.354..2.355 rows=0 loops=1)

  • Buffers: shared hit=176
6. 0.003 2.354 ↓ 0.0 0 1

HashAggregate (cost=17.99..19.57 rows=158 width=32) (actual time=2.354..2.354 rows=0 loops=1)

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

CTE Scan on ci_job_artifacts_with_row_number (cost=0.00..17.35 rows=257 width=32) (actual time=2.351..2.351 rows=0 loops=1)

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