explain.depesz.com

PostgreSQL's explain analyze made readable

Result: M7HU : base_and_ancestors(same_project: true)

Settings
# exclusive inclusive rows x rows loops node
1. 0.095 0.095 ↑ 11.0 1 1

CTE Scan on base_and_ancestors ci_pipelines (cost=387.47..387.69 rows=11 width=1,784) (actual time=0.073..0.095 rows=1 loops=1)

  • Buffers: shared hit=9
  • - planning: 1.273 ms
  • - execution: 0.203 ms
  • - I/O read: 0.000 ms
  • - I/O write: 0.000 ms
  • - hits: 9 (~72.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.008 0.091 ↑ 11.0 1 1

Recursive Union (cost=0.57..387.47 rows=11 width=314) (actual time=0.070..0.091 rows=1 loops=1)

  • Buffers: shared hit=9
4. 0.064 0.064 ↑ 1.0 1 1

Index Scan using ci_pipelines_pkey on public.ci_pipelines ci_pipelines_1 (cost=0.57..3.59 rows=1 width=314) (actual time=0.062..0.064 rows=1 loops=1)

  • Index Cond: (ci_pipelines_1.id = 171,465,064)
  • Buffers: shared hit=5
5. 0.000 0.019 ↓ 0.0 0 1

Nested Loop (cost=1.00..38.37 rows=1 width=314) (actual time=0.019..0.019 rows=0 loops=1)

  • Buffers: shared hit=4
6. 0.002 0.019 ↓ 0.0 0 1

Nested Loop (cost=0.43..34.80 rows=1 width=4) (actual time=0.019..0.019 rows=0 loops=1)

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

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

8. 0.015 0.015 ↓ 0.0 0 1

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.015..0.015 rows=0 loops=1)

  • Index Cond: (ci_sources_pipelines.pipeline_id = base_and_ancestors.id)
  • Filter: (ci_sources_pipelines.source_project_id = ci_sources_pipelines.project_id)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=4
9. 0.000 0.000 ↓ 0.0 0 0

Index Scan using ci_pipelines_pkey on public.ci_pipelines ci_pipelines_2 (cost=0.57..3.57 rows=1 width=314) (actual time=0.000..0.000 rows=0 loops=0)

  • Index Cond: (ci_pipelines_2.id = ci_sources_pipelines.source_pipeline_id)