explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nhbF

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,578.774 ↓ 3.0 3 1

Limit (cost=1,146.80..1,146.81 rows=1 width=762) (actual time=2,578.772..2,578.774 rows=3 loops=1)

2. 0.040 2,578.774 ↓ 3.0 3 1

Sort (cost=1,146.80..1,146.81 rows=1 width=762) (actual time=2,578.772..2,578.774 rows=3 loops=1)

  • Sort Key: issues.updated_at DESC, issues.id DESC
  • Sort Method: quicksort Memory: 30kB
3. 0.021 2,578.734 ↓ 3.0 3 1

Nested Loop Left Join (cost=2.30..1,146.79 rows=1 width=762) (actual time=89.156..2,578.734 rows=3 loops=1)

  • Filter: ((project_features.issues_access_level IS NULL) OR (project_features.issues_access_level = ANY ('{20,30}'::integer[])) OR ((project_features.issues_access_level = 10) AND (alternatives: SubPlan 3 or hashed SubPlan 4)))
4. 0.018 2,578.674 ↓ 3.0 3 1

Nested Loop Semi Join (cost=1.87..1,139.74 rows=1 width=766) (actual time=89.137..2,578.674 rows=3 loops=1)

  • Join Filter: (projects.id = rs.source_id)
5. 0.016 2,578.470 ↓ 3.0 3 1

Nested Loop (cost=0.87..1,125.46 rows=1 width=766) (actual time=89.067..2,578.470 rows=3 loops=1)

6. 0.702 1.522 ↓ 20.5 164 1

Index Scan using index_projects_on_namespace_id on projects (cost=0.43..73.28 rows=8 width=4) (actual time=0.041..1.522 rows=164 loops=1)

  • Index Cond: (namespace_id = 9970)
  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (visibility_level = 20))
7.          

SubPlan (for Index Scan)

8. 0.820 0.820 ↑ 1.0 1 164

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations (cost=0.56..3.58 rows=1 width=0) (actual time=0.005..0.005 rows=1 loops=164)

  • Index Cond: ((user_id = 955795) AND (project_id = projects.id) AND (access_level >= 10))
  • Heap Fetches: 18
9. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_1 (cost=0.56..29.17 rows=64 width=4) (never executed)

  • Index Cond: ((user_id = 955795) AND (access_level >= 10))
  • Heap Fetches: 0
10. 2,576.932 2,576.932 ↓ 0.0 0 164

Index Scan using index_issues_on_project_id_and_iid on issues (cost=0.43..131.51 rows=1 width=762) (actual time=5.907..15.713 rows=0 loops=164)

  • Index Cond: (project_id = projects.id)
  • Filter: (((title)::text ~~* '%amex%'::text) OR (description ~~* '%amex%'::text))
  • Rows Removed by Filter: 481
11. 0.021 0.186 ↑ 1.0 1 3

Nested Loop (cost=1.00..7.63 rows=1 width=8) (actual time=0.062..0.062 rows=1 loops=3)

  • Join Filter: (issues.project_id = rs.source_id)
12. 0.057 0.099 ↑ 1.0 1 3

Index Scan using projects_pkey on projects projects_1 (cost=0.43..6.96 rows=1 width=4) (actual time=0.033..0.033 rows=1 loops=3)

  • Index Cond: (id = issues.project_id)
  • Filter: ((alternatives: SubPlan 5 or hashed SubPlan 6) OR (visibility_level = 20))
13.          

SubPlan (for Index Scan)

14. 0.042 0.042 ↑ 1.0 1 3

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_4 (cost=0.56..3.58 rows=1 width=0) (actual time=0.014..0.014 rows=1 loops=3)

  • Index Cond: ((user_id = 955795) AND (project_id = projects_1.id))
  • Heap Fetches: 0
15. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_5 (cost=0.56..29.01 rows=64 width=4) (never executed)

  • Index Cond: (user_id = 955795)
  • Heap Fetches: 0
16. 0.066 0.066 ↑ 1.0 1 3

Index Scan using index_routes_on_source_type_and_source_id on routes rs (cost=0.56..0.65 rows=1 width=4) (actual time=0.022..0.022 rows=1 loops=3)

  • Index Cond: (((source_type)::text = 'Project'::text) AND (source_id = projects_1.id))
  • Filter: ((path)::text ~~ 'gitlab-org/%'::text)
17. 0.039 0.039 ↑ 1.0 1 3

Index Scan using index_project_features_on_project_id on project_features (cost=0.43..3.45 rows=1 width=8) (actual time=0.012..0.013 rows=1 loops=3)

  • Index Cond: (projects.id = project_id)
18.          

SubPlan (for Nested Loop Left Join)

19. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_2 (cost=0.56..3.58 rows=1 width=0) (never executed)

  • Index Cond: ((user_id = 955795) AND (project_id = projects.id) AND (access_level >= 10))
  • Heap Fetches: 0
20. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_3 (cost=0.56..29.17 rows=64 width=4) (never executed)

  • Index Cond: ((user_id = 955795) AND (access_level >= 10))
  • Heap Fetches: 0
Planning time : 25.826 ms
Execution time : 2,578.964 ms