explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KisL

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Join (cost=207,351.45..318,035.61 rows=275 width=4) (actual rows= loops=)

  • Hash Cond: (restricted_job_artifacts.id = ci_job_artifacts.id)
2.          

CTE restricted_job_artifacts

3. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=20,797.09..207,296.02 rows=4,892,117 width=4) (actual rows= loops=)

  • Hash Cond: (ci_job_artifacts_1.project_id = projects.id)
4. 0.000 0.000 ↓ 0.0

Seq Scan on ci_job_artifacts ci_job_artifacts_1 (cost=0.00..113,117.17 rows=4,892,117 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=1,531.97..1,531.97 rows=1,541,210 width=4) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=959.96..1,531.97 rows=1,541,210 width=4) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

HashAggregate (cost=959.53..961.53 rows=200 width=4) (actual rows= loops=)

  • Group Key: namespaces_1.id
8. 0.000 0.000 ↓ 0.0

CTE Scan on base_and_descendants namespaces_1 (cost=900.58..936.86 rows=1,814 width=4) (actual rows= loops=)

9.          

CTE base_and_descendants

10. 0.000 0.000 ↓ 0.0

Recursive Union (cost=0.00..900.58 rows=1,814 width=4) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on geo_node_namespace_links (cost=0.00..1.05 rows=4 width=4) (actual rows= loops=)

  • Filter: (geo_node_id = 100,109)
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..86.32 rows=181 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

WorkTable Scan on base_and_descendants (cost=0.00..0.80 rows=40 width=4) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Only Scan using index_namespaces_on_parent_id_and_id on namespaces (cost=0.43..2.09 rows=5 width=8) (actual rows= loops=)

  • Index Cond: (parent_id = base_and_descendants.id)
15. 0.000 0.000 ↓ 0.0

Index Only Scan using index_projects_on_namespace_id_and_id on projects (cost=0.43..2.76 rows=9 width=8) (actual rows= loops=)

  • Index Cond: (namespace_id = namespaces_1.id)
16. 0.000 0.000 ↓ 0.0

CTE Scan on restricted_job_artifacts (cost=0.00..97,842.34 rows=4,892,117 width=4) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=52.00..52.00 rows=275 width=4) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using ci_job_artifacts_pkey on ci_job_artifacts (cost=0.43..52.00 rows=275 width=4) (actual rows= loops=)

  • Index Cond: ((id >= 1) AND (id <= 1,000))
  • Filter: (((file_store = 1) OR (file_store IS NULL)) AND ((expire_at IS NULL) OR (expire_at > '2020-06-22 22:59:27.497704+00'::timestamp with time zone)))