explain.depesz.com

PostgreSQL's explain analyze made readable

Result: F42t

Settings
# exclusive inclusive rows x rows loops node
1. 0.236 0.407 ↑ 12,524.0 3 1

HashAggregate (cost=4,038.99..4,414.71 rows=37,572 width=1,784) (actual time=0.293..0.407 rows=3 loops=1)

  • Group Key: ci_pipelines.id, ci_pipelines.ref, ci_pipelines.sha, ci_pipelines.before_sha, ci_pipelines.created_at, ci_pipelines.updated_at, ci_pipelines.tag, ci_pipelines.yaml_errors, ci_pipelines.committed_at, ci_pipelines.project_id, ci_pipelines.status, ci_pipelines.started_at, ci_pipelines.finished_at, ci_pipelines.duration, ci_pipelines.user_id, ci_pipelines.lock_version, ci_pipelines.auto_canceled_by_id, ci_pipelines.pipeline_schedule_id, ci_pipelines.source, ci_pipelines.protected, ci_pipelines.config_source, ci_pipelines.failure_reason, ci_pipelines.iid, ci_pipelines.merge_request_id, ci_pipelines.source_sha, ci_pipelines.target_sha, ci_pipelines.external_pull_request_id, ci_pipelines.ci_ref_id, ci_pipelines.locked
  • Buffers: shared hit=55
  • - planning: 2.720 ms
  • - execution: 1.337 ms
  • - hits: 55 (~440.00 KiB) from the buffer pool
  • - reads: 0 from the OS file cache, including disk I/O
  • - dirtied: 0
  • - writes: 0
2.          

CTE base_and_ancestors

3. 0.010 0.059 ↑ 50.5 2 1

Recursive Union (cost=0.57..585.33 rows=101 width=316) (actual time=0.023..0.059 rows=2 loops=1)

  • Buffers: shared hit=17
4. 0.019 0.019 ↑ 1.0 1 1

Index Scan using ci_pipelines_pkey on public.ci_pipelines ci_pipelines_2 (cost=0.57..3.59 rows=1 width=316) (actual time=0.018..0.019 rows=1 loops=1)

  • Index Cond: (ci_pipelines_2.id = 171,465,064)
  • Buffers: shared hit=5
5. 0.003 0.030 ↓ 0.0 0 2

Nested Loop (cost=1.00..57.97 rows=10 width=316) (actual time=0.015..0.015 rows=0 loops=2)

  • Buffers: shared hit=12
6. 0.002 0.018 ↓ 0.0 0 2

Nested Loop (cost=0.43..34.77 rows=10 width=4) (actual time=0.009..0.009 rows=0 loops=2)

  • Buffers: shared hit=7
7. 0.002 0.002 ↑ 10.0 1 2

WorkTable Scan on base_and_ancestors (cost=0.00..0.20 rows=10 width=4) (actual time=0.001..0.001 rows=1 loops=2)

8. 0.014 0.014 ↓ 0.0 0 2

Index Scan using index_ci_sources_pipelines_on_pipeline_id on public.ci_sources_pipelines (cost=0.43..3.45 rows=1 width=8) (actual time=0.006..0.007 rows=0 loops=2)

  • Index Cond: (ci_sources_pipelines.pipeline_id = base_and_ancestors.id)
  • Buffers: shared hit=7
9. 0.009 0.009 ↑ 1.0 1 1

Index Scan using ci_pipelines_pkey on public.ci_pipelines ci_pipelines_3 (cost=0.57..2.32 rows=1 width=316) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (ci_pipelines_3.id = ci_sources_pipelines.source_pipeline_id)
  • Buffers: shared hit=5
10.          

CTE base_and_descendants

11. 0.016 0.101 ↑ 12,490.3 3 1

Recursive Union (cost=585.33..123,019.20 rows=37,471 width=1,784) (actual time=0.015..0.101 rows=3 loops=1)

  • Buffers: shared hit=38
12. 0.045 0.045 ↑ 50.5 2 1

CTE Scan on base_and_ancestors ci_pipelines_6 (cost=585.33..587.35 rows=101 width=1,784) (actual time=0.012..0.045 rows=2 loops=1)

  • Buffers: shared hit=17
13.          

CTE base_and_ancestors

14. 0.008 0.041 ↑ 50.5 2 1

Recursive Union (cost=0.57..585.33 rows=101 width=316) (actual time=0.010..0.041 rows=2 loops=1)

  • Buffers: shared hit=17
15. 0.007 0.007 ↑ 1.0 1 1

Index Scan using ci_pipelines_pkey on public.ci_pipelines ci_pipelines_4 (cost=0.57..3.59 rows=1 width=316) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (ci_pipelines_4.id = 171,465,064)
  • Buffers: shared hit=5
16. 0.002 0.026 ↓ 0.0 0 2

Nested Loop (cost=1.00..57.97 rows=10 width=316) (actual time=0.012..0.013 rows=0 loops=2)

  • Buffers: shared hit=12
17. 0.004 0.016 ↓ 0.0 0 2

Nested Loop (cost=0.43..34.77 rows=10 width=4) (actual time=0.007..0.008 rows=0 loops=2)

  • Buffers: shared hit=7
18. 0.002 0.002 ↑ 10.0 1 2

WorkTable Scan on base_and_ancestors base_and_ancestors_1 (cost=0.00..0.20 rows=10 width=4) (actual time=0.001..0.001 rows=1 loops=2)

19. 0.010 0.010 ↓ 0.0 0 2

Index Scan using index_ci_sources_pipelines_on_pipeline_id on public.ci_sources_pipelines ci_sources_pipelines_1 (cost=0.43..3.45 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (ci_sources_pipelines_1.pipeline_id = base_and_ancestors_1.id)
  • Buffers: shared hit=7
20. 0.008 0.008 ↑ 1.0 1 1

Index Scan using ci_pipelines_pkey on public.ci_pipelines ci_pipelines_5 (cost=0.57..2.32 rows=1 width=316) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (ci_pipelines_5.id = ci_sources_pipelines_1.source_pipeline_id)
  • Buffers: shared hit=5
21. 0.004 0.040 ↑ 3,737.0 1 2

Nested Loop (cost=1.00..12,168.24 rows=3,737 width=316) (actual time=0.015..0.020 rows=1 loops=2)

  • Buffers: shared hit=21
22. 0.002 0.022 ↑ 3,737.0 1 2

Nested Loop (cost=0.43..3,499.33 rows=3,737 width=4) (actual time=0.008..0.011 rows=1 loops=2)

  • Buffers: shared hit=11
23. 0.002 0.002 ↑ 505.0 2 2

WorkTable Scan on base_and_descendants (cost=0.00..20.20 rows=1,010 width=4) (actual time=0.001..0.001 rows=2 loops=2)

24. 0.018 0.018 ↑ 4.0 1 3

Index Scan using index_ci_sources_pipelines_on_source_pipeline_id on public.ci_sources_pipelines ci_sources_pipelines_2 (cost=0.43..3.40 rows=4 width=8) (actual time=0.006..0.006 rows=1 loops=3)

  • Index Cond: (ci_sources_pipelines_2.source_pipeline_id = base_and_descendants.id)
  • Buffers: shared hit=11
25. 0.014 0.014 ↑ 1.0 1 2

Index Scan using ci_pipelines_pkey on public.ci_pipelines ci_pipelines_7 (cost=0.57..2.32 rows=1 width=316) (actual time=0.007..0.007 rows=1 loops=2)

  • Index Cond: (ci_pipelines_7.id = ci_sources_pipelines_2.pipeline_id)
  • Buffers: shared hit=10
26. 0.002 0.171 ↑ 7,514.4 5 1

Append (cost=0.00..1,315.02 rows=37,572 width=1,784) (actual time=0.026..0.171 rows=5 loops=1)

  • Buffers: shared hit=55
  • - I/O read: 0.000 ms
  • - I/O write: 0.000 ms
27. 0.064 0.064 ↑ 50.5 2 1

CTE Scan on base_and_ancestors ci_pipelines (cost=0.00..2.02 rows=101 width=1,784) (actual time=0.026..0.064 rows=2 loops=1)

  • Buffers: shared hit=17
28. 0.105 0.105 ↑ 12,490.3 3 1

CTE Scan on base_and_descendants ci_pipelines_1 (cost=0.00..749.42 rows=37,471 width=1,784) (actual time=0.016..0.105 rows=3 loops=1)

  • Buffers: shared hit=38