explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ew7J5

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

ModifyTable on public.ci_pipelines (cost=354.75..357.78 rows=1 width=354) (actual time=0.048..0.049 rows=0 loops=1)

  • Buffers: shared hit=2
2. 0.001 0.047 ↓ 0.0 0 1

Nested Loop (cost=354.75..357.78 rows=1 width=354) (actual time=0.046..0.047 rows=0 loops=1)

  • Buffers: shared hit=2
3. 0.002 0.046 ↓ 0.0 0 1

HashAggregate (cost=354.18..354.19 rows=1 width=32) (actual time=0.046..0.046 rows=0 loops=1)

  • Group Key: "ANY_subquery".id
  • Buffers: shared hit=2
4. 0.000 0.044 ↓ 0.0 0 1

Subquery Scan on ANY_subquery (cost=272.56..354.18 rows=1 width=32) (actual time=0.044..0.044 rows=0 loops=1)

  • Buffers: shared hit=2
5. 0.001 0.044 ↓ 0.0 0 1

Limit (cost=272.56..354.17 rows=1 width=10) (actual time=0.044..0.044 rows=0 loops=1)

  • Buffers: shared hit=2
6. 0.001 0.043 ↓ 0.0 0 1

LockRows (cost=272.56..435.78 rows=2 width=10) (actual time=0.043..0.043 rows=0 loops=1)

  • Buffers: shared hit=2
7. 0.042 0.042 ↓ 0.0 0 1

Index Scan using index_ci_pipelines_on_project_id_and_id_and_ref on public.ci_pipelines ci_pipelines_1 (cost=272.56..435.76 rows=2 width=10) (actual time=0.042..0.042 rows=0 loops=1)

  • Index Cond: ((ci_pipelines_1.project_id = 5) AND (ci_pipelines_1.id < 140361418) AND ((ci_pipelines_1.ref)::text = 'master'::text))
  • Filter: (ci_pipelines_1.tag AND ci_pipelines_1.artifacts_locked AND (NOT (hashed SubPlan 2)))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=2
8.          

SubPlan (for Index Scan)

9. 0.000 0.000 ↓ 0.0 0 0

Index Scan using index_ci_pipelines_on_project_idandrefandiddesc on public.ci_pipelines ci_pipelines_3 (cost=7.69..272.28 rows=3 width=4) (actual time=0.000..0.000 rows=0 loops=0)

  • Index Cond: ((ci_pipelines_3.project_id = 5) AND ((ci_pipelines_3.ref)::text = 'master'::text) AND (ci_pipelines_3.id < 140361418))
  • Filter: (ci_pipelines_3.tag AND ((ci_pipelines_3.id = 140,361,418) OR (hashed SubPlan 1)))
  • Rows Removed by Filter: 0
10.          

SubPlan (for Index Scan)

11. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.00..7.12 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=0)

12. 0.000 0.000 ↓ 0.0 0 0

Index Scan using index_ci_sources_pipelines_on_source_pipeline_id on public.ci_sources_pipelines (cost=0.43..3.53 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=0)

  • Index Cond: (ci_sources_pipelines.source_pipeline_id = 140,361,418)
  • Filter: (ci_sources_pipelines.source_project_id = ci_sources_pipelines.project_id)
  • Rows Removed by Filter: 0
13. 0.000 0.000 ↓ 0.0 0 0

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

  • Index Cond: (ci_pipelines_2.id = ci_sources_pipelines.pipeline_id)
  • Heap Fetches: 0
14. 0.000 0.000 ↓ 0.0 0 0

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

  • Index Cond: (ci_pipelines.id = "ANY_subquery".id)