explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AZb : a-v2.sql

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 0.154 ↑ 1.4 5 1

HashAggregate (cost=60.31..60.38 rows=7 width=10) (actual time=0.153..0.154 rows=5 loops=1)

  • Group Key: vulnerability_occurrences.severity
2. 0.015 0.146 ↑ 4.3 22 1

Nested Loop (cost=14.29..59.83 rows=95 width=2) (actual time=0.102..0.146 rows=22 loops=1)

3. 0.006 0.109 ↑ 4.3 22 1

Nested Loop (cost=14.02..24.52 rows=95 width=8) (actual time=0.100..0.109 rows=22 loops=1)

4. 0.001 0.097 ↑ 4.0 1 1

HashAggregate (cost=13.74..13.78 rows=4 width=4) (actual time=0.097..0.097 rows=1 loops=1)

  • Group Key: max(ci_pipelines.id)
5. 0.002 0.096 ↑ 4.0 1 1

GroupAggregate (cost=13.62..13.69 rows=4 width=8) (actual time=0.096..0.096 rows=1 loops=1)

  • Group Key: ci_pipelines.project_id
6. 0.006 0.094 ↓ 1.5 6 1

Sort (cost=13.62..13.63 rows=4 width=8) (actual time=0.093..0.094 rows=6 loops=1)

  • Sort Key: ci_pipelines.project_id
  • Sort Method: quicksort Memory: 25kB
7. 0.003 0.088 ↓ 1.5 6 1

Nested Loop Semi Join (cost=7.48..13.58 rows=4 width=8) (actual time=0.064..0.088 rows=6 loops=1)

8. 0.002 0.071 ↑ 2.4 7 1

Nested Loop (cost=7.21..8.36 rows=17 width=8) (actual time=0.059..0.071 rows=7 loops=1)

  • Join Filter: (ci_pipelines.project_id = rs.source_id)
9. 0.004 0.051 ↓ 3.0 9 1

HashAggregate (cost=7.06..7.09 rows=3 width=8) (actual time=0.050..0.051 rows=9 loops=1)

  • Group Key: projects.id
10. 0.010 0.047 ↓ 3.0 9 1

Hash Join (cost=3.31..7.06 rows=3 width=8) (actual time=0.031..0.047 rows=9 loops=1)

  • Hash Cond: (projects.id = rs.source_id)
11. 0.019 0.019 ↑ 1.0 48 1

Seq Scan on projects (cost=0.00..3.48 rows=48 width=4) (actual time=0.007..0.019 rows=48 loops=1)

12. 0.002 0.018 ↓ 3.0 9 1

Hash (cost=3.27..3.27 rows=3 width=4) (actual time=0.018..0.018 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.016 0.016 ↓ 3.0 9 1

Index Scan using index_routes_on_path on routes rs (cost=0.14..3.27 rows=3 width=4) (actual time=0.008..0.016 rows=9 loops=1)

  • Index Cond: (((path)::text >= 'gitlab-org/'::text) AND ((path)::text < 'gitlab-org0'::text))
  • Filter: (((path)::text ~~ 'gitlab-org/%'::text) AND ((source_type)::text = 'Project'::text))
14. 0.018 0.018 ↑ 4.0 1 9

Index Scan using index_ci_pipelines_on_project_id_and_status_and_config_source on ci_pipelines (cost=0.14..0.37 rows=4 width=8) (actual time=0.001..0.002 rows=1 loops=9)

  • Index Cond: ((project_id = projects.id) AND ((status)::text = 'success'::text))
15. 0.014 0.014 ↑ 24.0 1 7

Index Only Scan using index_vulnerability_occurrence_pipelines_on_pipeline_id on vulnerability_occurrence_pipelines vulnerability_occurrence_pipelines_1 (cost=0.28..0.82 rows=24 width=4) (actual time=0.002..0.002 rows=1 loops=7)

  • Index Cond: (pipeline_id = ci_pipelines.id)
  • Heap Fetches: 6
16. 0.006 0.006 ↑ 1.1 22 1

Index Scan using index_vulnerability_occurrence_pipelines_on_pipeline_id on vulnerability_occurrence_pipelines (cost=0.28..2.45 rows=24 width=12) (actual time=0.002..0.006 rows=22 loops=1)

  • Index Cond: (pipeline_id = (max(ci_pipelines.id)))
17. 0.022 0.022 ↑ 1.0 1 22

Index Scan using vulnerability_occurrences_pkey on vulnerability_occurrences (cost=0.28..0.36 rows=1 width=10) (actual time=0.001..0.001 rows=1 loops=22)

  • Index Cond: (id = vulnerability_occurrence_pipelines.occurrence_id)
Planning time : 1.447 ms
Execution time : 0.253 ms