explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8bUo

Settings
# exclusive inclusive rows x rows loops node
1. 4.747 106.375 ↑ 2.3 8,391 1

Sort (cost=48,065.99..48,114.93 rows=19,577 width=58) (actual time=104.962..106.375 rows=8,391 loops=1)

  • Sort Key: resource_milestone_events.created_at
  • Sort Method: quicksort Memory: 1,040kB
  • Buffers: shared hit=42,781 read=16
  • I/O Timings: read=1.049
2. 11.988 101.628 ↑ 2.3 8,391 1

HashAggregate (cost=46,474.68..46,670.45 rows=19,577 width=58) (actual time=97.907..101.628 rows=8,391 loops=1)

  • Group Key: ('milestone'::text), resource_milestone_events.created_at, resource_milestone_events.milestone_id, resource_milestone_events.action, resource_milestone_events.issue_id
  • Buffers: shared hit=42,781 read=16
  • I/O Timings: read=1.049
3. 1.464 89.640 ↑ 2.3 8,391 1

Append (cost=4,163.95..46,229.97 rows=19,577 width=58) (actual time=8.916..89.640 rows=8,391 loops=1)

  • Buffers: shared hit=42,781 read=16
  • I/O Timings: read=1.049
4. 3.994 46.288 ↑ 1.1 6,985 1

Nested Loop (cost=4,163.95..19,863.41 rows=7,980 width=58) (actual time=8.914..46.288 rows=6,985 loops=1)

  • Buffers: shared hit=18,445 read=16
  • I/O Timings: read=1.049
5. 3.312 10.328 ↑ 1.6 2,906 1

HashAggregate (cost=4,163.52..4,209.83 rows=4,631 width=8) (actual time=8.884..10.328 rows=2,906 loops=1)

  • Group Key: resource_milestone_events_1.issue_id
  • Buffers: shared hit=2,741 read=16
  • I/O Timings: read=1.049
6. 7.016 7.016 ↓ 1.0 4,819 1

Index Scan using add_events2 on public.resource_milestone_events resource_milestone_events_1 (cost=0.43..4,151.92 rows=4,639 width=8) (actual time=0.478..7.016 rows=4,819 loops=1)

  • Index Cond: (resource_milestone_events_1.milestone_id = 1,233,752)
  • Filter: (resource_milestone_events_1.created_at <= '2020-08-17 23:59:59.999999+00'::timestamp with time zone)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=2,741 read=16
  • I/O Timings: read=1.049
7. 31.966 31.966 ↑ 1.0 2 2,906

Index Scan using index_resource_milestone_events_on_issue_id on public.resource_milestone_events (cost=0.43..3.35 rows=2 width=26) (actual time=0.007..0.011 rows=2 loops=2,906)

  • Index Cond: (resource_milestone_events.issue_id = resource_milestone_events_1.issue_id)
  • Filter: (resource_milestone_events.created_at <= '2020-08-17 23:59:59.999999+00'::timestamp with time zone)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=15,704
8. 0.159 21.137 ↑ 12.6 422 1

Subquery Scan on *SELECT* 2 (cost=4,163.95..16,923.50 rows=5,334 width=58) (actual time=8.496..21.137 rows=422 loops=1)

  • Buffers: shared hit=11,916
9. 0.000 20.978 ↑ 12.6 422 1

Nested Loop (cost=4,163.95..16,856.82 rows=5,334 width=52) (actual time=8.492..20.978 rows=422 loops=1)

  • Buffers: shared hit=11,916
10. 3.225 9.421 ↑ 1.6 2,906 1

HashAggregate (cost=4,163.52..4,209.83 rows=4,631 width=8) (actual time=8.384..9.421 rows=2,906 loops=1)

  • Group Key: resource_milestone_events_2.issue_id
  • Buffers: shared hit=2,757
11. 6.196 6.196 ↓ 1.0 4,819 1

Index Scan using add_events2 on public.resource_milestone_events resource_milestone_events_2 (cost=0.43..4,151.92 rows=4,639 width=8) (actual time=0.059..6.196 rows=4,819 loops=1)

  • Index Cond: (resource_milestone_events_2.milestone_id = 1,233,752)
  • Filter: (resource_milestone_events_2.created_at <= '2020-08-17 23:59:59.999999+00'::timestamp with time zone)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=2,757
12. 11.624 11.624 ↓ 0.0 0 2,906

Index Scan using index_resource_state_events_on_issue_id_and_created_at on public.resource_state_events (cost=0.43..2.71 rows=1 width=18) (actual time=0.004..0.004 rows=0 loops=2,906)

  • Index Cond: ((resource_state_events.issue_id = resource_milestone_events_2.issue_id) AND (resource_state_events.created_at <= '2020-08-17 23:59:59.999999+00'::timestamp with time zone))
  • Buffers: shared hit=9,159
13. 0.349 20.751 ↑ 6.4 984 1

Subquery Scan on *SELECT* 3 (cost=4,163.94..9,265.38 rows=6,263 width=58) (actual time=6.759..20.751 rows=984 loops=1)

  • Buffers: shared hit=12,420
14. 0.845 20.402 ↑ 6.4 984 1

Nested Loop (cost=4,163.94..9,187.09 rows=6,263 width=54) (actual time=6.756..20.402 rows=984 loops=1)

  • Buffers: shared hit=12,420
15. 2.954 7.933 ↑ 1.6 2,906 1

HashAggregate (cost=4,163.52..4,209.83 rows=4,631 width=8) (actual time=6.732..7.933 rows=2,906 loops=1)

  • Group Key: resource_milestone_events_3.issue_id
  • Buffers: shared hit=2,757
16. 4.979 4.979 ↓ 1.0 4,819 1

Index Scan using add_events2 on public.resource_milestone_events resource_milestone_events_3 (cost=0.43..4,151.92 rows=4,639 width=8) (actual time=0.030..4.979 rows=4,819 loops=1)

  • Index Cond: (resource_milestone_events_3.milestone_id = 1,233,752)
  • Filter: (resource_milestone_events_3.created_at <= '2020-08-17 23:59:59.999999+00'::timestamp with time zone)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=2,757
17. 11.624 11.624 ↓ 0.0 0 2,906

Index Scan using index_resource_weight_events_on_issue_id_and_created_at on public.resource_weight_events (cost=0.42..1.05 rows=1 width=20) (actual time=0.004..0.004 rows=0 loops=2,906)

  • Index Cond: ((resource_weight_events.issue_id = resource_milestone_events_3.issue_id) AND (resource_weight_events.created_at <= '2020-08-17 23:59:59.999999+00'::timestamp with time zone))
  • Buffers: shared hit=9,663