explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sH5B : Optimization for: plan #gRLF

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.432 10.268 ↑ 1.0 1 1

Aggregate (cost=2,792.58..2,792.60 rows=1 width=8) (actual time=10.268..10.268 rows=1 loops=1)

  • Buffers: shared hit=3624 read=1
2. 0.278 9.836 ↓ 3.8 629 1

Nested Loop (cost=1.99..2,791.33 rows=167 width=24) (actual time=4.304..9.836 rows=629 loops=1)

  • Buffers: shared hit=3614 read=1
3. 0.090 5.286 ↓ 1.2 712 1

Nested Loop (cost=1.56..101.02 rows=607 width=12) (actual time=4.269..5.286 rows=712 loops=1)

  • Buffers: shared hit=760 read=1
4. 0.005 4.210 ↑ 1.0 1 1

Nested Loop (cost=1.00..9.04 rows=1 width=4) (actual time=4.208..4.210 rows=1 loops=1)

  • Buffers: shared hit=9 read=1
5. 0.018 0.018 ↑ 1.0 1 1

Index Scan using projects_pkey on public.projects (cost=0.43..4.45 rows=1 width=8) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: (projects.id = $PROJECT_ID)
  • Buffers: shared hit=4
6. 4.187 4.187 ↑ 1.0 1 1

Index Only Scan using index_routes_on_source_type_and_source_id on public.routes (cost=0.56..4.58 rows=1 width=4) (actual time=4.186..4.187 rows=1 loops=1)

  • Index Cond: ((routes.source_type = 'Namespace'::text) AND (routes.source_id = projects.namespace_id))
  • Buffers: shared hit=5 read=1
7. 0.986 0.986 ↑ 1.7 712 1

Index Only Scan using index_issues_on_project_id_and_created_at_and_id_and_state on public.issues (cost=0.56..79.83 rows=1,215 width=16) (actual time=0.060..0.986 rows=712 loops=1)

  • Index Cond: ((issues.project_id = $PROJECT_ID) AND (issues.created_at >= '2019-07-08 10:49:57.023743+00'::timestamp with time zone))
  • Buffers: shared hit=751
8. 4.272 4.272 ↑ 1.0 1 712

Index Scan using index_issue_metrics on public.issue_metrics (cost=0.43..4.42 rows=1 width=20) (actual time=0.006..0.006 rows=1 loops=712)

  • Index Cond: (issue_metrics.issue_id = issues.id)
  • Filter: (((COALESCE(issue_metrics.first_associated_with_milestone_at, issue_metrics.first_added_to_board_at))::timestamp with time zone - issues.created_at) > '00:00:00'::interval)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=2854
Planning time : 8.842 ms
Execution time : 10.406 ms