explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZaSY

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 1.216 ↑ 1.0 2 1

GroupAggregate (cost=704.38..704.45 rows=2 width=15) (actual time=1.210..1.216 rows=2 loops=1)

  • Group Key: issues.state
2. 0.017 1.208 ↓ 6.5 39 1

Sort (cost=704.38..704.40 rows=6 width=7) (actual time=1.205..1.208 rows=39 loops=1)

  • Sort Key: issues.state
  • Sort Method: quicksort Memory: 26kB
3. 0.015 1.191 ↓ 6.5 39 1

Nested Loop Left Join (cost=658.04..704.31 rows=6 width=7) (actual time=0.353..1.191 rows=39 loops=1)

  • Filter: ((project_features.issues_access_level > 0) OR (project_features.issues_access_level IS NULL))
4. 0.030 1.098 ↓ 6.5 39 1

Nested Loop (cost=657.61..701.39 rows=6 width=11) (actual time=0.341..1.098 rows=39 loops=1)

5. 0.003 0.795 ↓ 6.5 39 1

Nested Loop (cost=657.17..676.89 rows=6 width=11) (actual time=0.306..0.795 rows=39 loops=1)

6. 0.051 0.324 ↓ 6.5 39 1

HashAggregate (cost=656.61..656.67 rows=6 width=4) (actual time=0.288..0.324 rows=39 loops=1)

  • Group Key: epic_issues.issue_id
7. 0.006 0.273 ↓ 6.5 39 1

Nested Loop (cost=650.80..656.60 rows=6 width=4) (actual time=0.144..0.273 rows=39 loops=1)

8. 0.003 0.132 ↓ 3.0 3 1

HashAggregate (cost=650.51..650.52 rows=1 width=4) (actual time=0.132..0.132 rows=3 loops=1)

  • Group Key: epics.id
9. 0.129 0.129 ↓ 3.0 3 1

CTE Scan on base_and_descendants epics (cost=644.40..650.50 rows=1 width=4) (actual time=0.062..0.129 rows=3 loops=1)

  • Filter: (group_id = 9970)
10.          

CTE base_and_descendants

11. 0.078 0.121 ↑ 90.3 3 1

Recursive Union (cost=0.29..644.40 rows=271 width=774) (actual time=0.056..0.121 rows=3 loops=1)

12. 0.013 0.013 ↑ 1.0 1 1

Index Scan using epics_pkey on epics epics_1 (cost=0.29..3.30 rows=1 width=774) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: (id = 11091)
13. 0.000 0.030 ↑ 27.0 1 2

Nested Loop (cost=0.29..63.57 rows=27 width=774) (actual time=0.012..0.015 rows=1 loops=2)

14. 0.002 0.002 ↑ 5.0 2 2

WorkTable Scan on base_and_descendants (cost=0.00..0.20 rows=10 width=4) (actual time=0.000..0.001 rows=2 loops=2)

15. 0.030 0.030 ↑ 3.0 1 3

Index Scan using index_epics_on_parent_id on epics epics_2 (cost=0.29..6.31 rows=3 width=774) (actual time=0.008..0.010 rows=1 loops=3)

  • Index Cond: (parent_id = base_and_descendants.id)
16. 0.135 0.135 ↓ 2.2 13 3

Index Scan using index_epic_issues_on_epic_id on epic_issues (cost=0.29..6.01 rows=6 width=8) (actual time=0.009..0.045 rows=13 loops=3)

  • Index Cond: (epic_id = epics.id)
17. 0.468 0.468 ↑ 1.0 1 39

Index Scan using issues_pkey on issues (cost=0.56..3.36 rows=1 width=15) (actual time=0.011..0.012 rows=1 loops=39)

  • Index Cond: (id = epic_issues.issue_id)
18. 0.195 0.273 ↑ 1.0 1 39

Index Scan using projects_pkey on projects (cost=0.43..4.07 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=39)

  • Index Cond: (id = issues.project_id)
  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (visibility_level = ANY ('{0,10,20}'::integer[])))
19.          

SubPlan (for Index Scan)

20. 0.078 0.078 ↑ 1.0 1 39

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.002..0.002 rows=1 loops=39)

  • Index Cond: ((user_id = 1) AND (project_id = projects.id))
  • Heap Fetches: 0
21. 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..34.50 rows=117 width=4) (never executed)

  • Index Cond: (user_id = 1)
  • Heap Fetches: 0
22. 0.078 0.078 ↑ 1.0 1 39

Index Scan using index_project_features_on_project_id on project_features (cost=0.43..0.47 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=39)

  • Index Cond: (projects.id = project_id)
Planning time : 2.080 ms
Execution time : 1.389 ms