explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tdwt

Settings
# exclusive inclusive rows x rows loops node
1. 0.032 4.016 ↓ 5.6 500 1

Limit (cost=1,259.20..7,328.64 rows=89 width=16) (actual time=0.090..4.016 rows=500 loops=1)

2. 0.578 3.984 ↓ 5.6 500 1

Nested Loop (cost=1,259.20..7,328.64 rows=89 width=16) (actual time=0.090..3.984 rows=500 loops=1)

3. 0.062 0.686 ↑ 1.1 544 1

Nested Loop (cost=1,258.76..7,007.26 rows=575 width=12) (actual time=0.066..0.686 rows=544 loops=1)

4. 0.001 0.046 ↑ 1,050.5 2 1

Nested Loop (cost=1,258.20..4,614.22 rows=2,101 width=4) (actual time=0.042..0.046 rows=2 loops=1)

5. 0.024 0.024 ↑ 131.0 1 1

CTE Scan on base_and_descendants namespaces (cost=1,257.76..1,260.38 rows=131 width=2,907) (actual time=0.024..0.024 rows=1 loops=1)

6.          

CTE base_and_descendants

7. 0.006 0.021 ↑ 131.0 1 1

Recursive Union (cost=0.43..1,257.76 rows=131 width=322) (actual time=0.021..0.021 rows=1 loops=1)

8. 0.015 0.015 ↑ 1.0 1 1

Index Scan using namespaces_pkey on namespaces namespaces_1 (cost=0.43..3.45 rows=1 width=322) (actual time=0.015..0.015 rows=1 loops=1)

  • Index Cond: (id = 9970)
  • Filter: ((type)::text = 'Group'::text)
9. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..125.17 rows=13 width=322) (never executed)

10. 0.000 0.000 ↓ 0.0 0

WorkTable Scan on base_and_descendants (cost=0.00..0.20 rows=10 width=4) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Index Scan using index_namespaces_on_parent_id_and_id on namespaces namespaces_2 (cost=0.43..12.49 rows=1 width=322) (never executed)

  • Index Cond: (parent_id = base_and_descendants.id)
  • Filter: ((type)::text = 'Group'::text)
12. 0.021 0.021 ↑ 8.0 2 1

Index Scan using index_projects_on_namespace_id on projects (cost=0.43..25.43 rows=16 width=8) (actual time=0.017..0.021 rows=2 loops=1)

  • Index Cond: (namespace_id = namespaces.id)
13. 0.578 0.578 ↓ 16.0 272 2

Index Only Scan using idx_issues_on_project_id_and_created_at_and_id_and_state_id on issues (cost=0.56..0.97 rows=17 width=16) (actual time=0.017..0.289 rows=272 loops=2)

  • Index Cond: ((project_id = projects.id) AND (created_at >= '2019-07-01 00:00:00+00'::timestamp with time zone) AND (created_at <= '2019-11-01 00:00:00+00'::timestamp with time zone))
  • Heap Fetches: 73
14. 2.720 2.720 ↑ 1.0 1 544

Index Scan using index_issue_metrics on issue_metrics (cost=0.44..0.55 rows=1 width=20) (actual time=0.005..0.005 rows=1 loops=544)

  • Index Cond: (issue_id = issues.id)
  • Filter: (((first_added_to_board_at IS NOT NULL) OR (first_associated_with_milestone_at IS NOT NULL)) AND (COALESCE(first_associated_with_milestone_at, first_added_to_board_at) >= issues.created_at))
  • Rows Removed by Filter: 0
Planning time : 2.117 ms
Execution time : 4.220 ms