explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9Cag

Settings
# exclusive inclusive rows x rows loops node
1. 1.127 254.773 ↑ 2.5 8,762 1

Limit (cost=53,882.20..53,937.93 rows=22,291 width=58) (actual time=252.750..254.773 rows=8,762 loops=1)

  • Buffers: shared hit=40,571 read=4,473 dirtied=407
  • I/O Timings: read=155.150
2. 4.424 253.646 ↑ 2.5 8,762 1

Sort (cost=53,882.20..53,937.93 rows=22,291 width=58) (actual time=252.749..253.646 rows=8,762 loops=1)

  • Sort Key: resource_milestone_events.created_at
  • Sort Method: quicksort Memory: 1,069kB
  • Buffers: shared hit=40,571 read=4,473 dirtied=407
  • I/O Timings: read=155.150
3. 10.287 249.222 ↑ 2.5 8,762 1

HashAggregate (cost=52,049.42..52,272.33 rows=22,291 width=58) (actual time=246.127..249.222 rows=8,762 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=40,568 read=4,473 dirtied=407
  • I/O Timings: read=155.150
4. 1.415 238.935 ↑ 2.5 8,762 1

Append (cost=4,632.89..51,770.78 rows=22,291 width=58) (actual time=15.167..238.935 rows=8,762 loops=1)

  • Buffers: shared hit=40,568 read=4,473 dirtied=407
  • I/O Timings: read=155.150
5. 2.243 95.099 ↑ 1.3 7,170 1

Nested Loop (cost=4,632.89..22,018.06 rows=9,025 width=58) (actual time=15.166..95.099 rows=7,170 loops=1)

  • Buffers: shared hit=17,479 read=1,791 dirtied=394
  • I/O Timings: read=51.337
6. 2.990 14.336 ↑ 1.7 3,020 1

HashAggregate (cost=4,632.46..4,684.98 rows=5,252 width=8) (actual time=13.051..14.336 rows=3,020 loops=1)

  • Group Key: resource_milestone_events_1.issue_id
  • Buffers: shared hit=3,023 read=17 dirtied=319
  • I/O Timings: read=0.598
7. 11.346 11.346 ↑ 1.0 5,254 1

Index Scan using index_resource_milestone_events_on_milestone_id_and_add_action on public.resource_milestone_events resource_milestone_events_1 (cost=0.43..4,619.30 rows=5,262 width=8) (actual time=0.187..11.346 rows=5,254 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=3,023 read=17 dirtied=319
  • I/O Timings: read=0.598
8. 78.520 78.520 ↑ 1.0 2 3,020

Index Scan using index_resource_milestone_events_on_issue_id on public.resource_milestone_events (cost=0.43..3.27 rows=2 width=26) (actual time=0.022..0.026 rows=2 loops=3,020)

  • 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=14,456 read=1,774 dirtied=75
  • I/O Timings: read=50.739
9. 0.299 93.488 ↑ 11.0 562 1

Subquery Scan on *SELECT* 2 (cost=4,632.89..19,443.85 rows=6,165 width=58) (actual time=19.094..93.488 rows=562 loops=1)

  • Buffers: shared hit=11,220 read=1,460 dirtied=5
  • I/O Timings: read=74.691
10. 1.528 93.189 ↑ 11.0 562 1

Nested Loop (cost=4,632.89..19,366.79 rows=6,165 width=52) (actual time=19.092..93.189 rows=562 loops=1)

  • Buffers: shared hit=11,220 read=1,460 dirtied=5
  • I/O Timings: read=74.691
11. 2.631 7.101 ↑ 1.7 3,020 1

HashAggregate (cost=4,632.46..4,684.98 rows=5,252 width=8) (actual time=5.998..7.101 rows=3,020 loops=1)

  • Group Key: resource_milestone_events_2.issue_id
  • Buffers: shared hit=3,037
12. 4.470 4.470 ↑ 1.0 5,254 1

Index Scan using index_resource_milestone_events_on_milestone_id_and_add_action on public.resource_milestone_events resource_milestone_events_2 (cost=0.43..4,619.30 rows=5,262 width=8) (actual time=0.022..4.470 rows=5,254 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=3,037
13. 84.560 84.560 ↓ 0.0 0 3,020

Index Scan using index_resource_state_events_on_issue_id_and_created_at on public.resource_state_events (cost=0.43..2.78 rows=1 width=18) (actual time=0.026..0.028 rows=0 loops=3,020)

  • 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=8,183 read=1,460 dirtied=5
  • I/O Timings: read=74.691
14. 0.414 48.933 ↑ 6.9 1,030 1

Subquery Scan on *SELECT* 3 (cost=4,632.88..10,107.16 rows=7,101 width=58) (actual time=8.100..48.933 rows=1,030 loops=1)

  • Buffers: shared hit=11,869 read=1,222 dirtied=8
  • I/O Timings: read=29.122
15. 2.129 48.519 ↑ 6.9 1,030 1

Nested Loop (cost=4,632.88..10,018.40 rows=7,101 width=54) (actual time=8.099..48.519 rows=1,030 loops=1)

  • Buffers: shared hit=11,869 read=1,222 dirtied=8
  • I/O Timings: read=29.122
16. 2.538 7.130 ↑ 1.7 3,020 1

HashAggregate (cost=4,632.46..4,684.98 rows=5,252 width=8) (actual time=6.109..7.130 rows=3,020 loops=1)

  • Group Key: resource_milestone_events_3.issue_id
  • Buffers: shared hit=3,037
17. 4.592 4.592 ↑ 1.0 5,254 1

Index Scan using index_resource_milestone_events_on_milestone_id_and_add_action on public.resource_milestone_events resource_milestone_events_3 (cost=0.43..4,619.30 rows=5,262 width=8) (actual time=0.041..4.592 rows=5,254 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=3,037
18. 39.260 39.260 ↓ 0.0 0 3,020

Index Scan using index_resource_weight_events_on_issue_id_and_weight on public.resource_weight_events (cost=0.42..1.00 rows=1 width=20) (actual time=0.012..0.013 rows=0 loops=3,020)

  • Index Cond: (resource_weight_events.issue_id = resource_milestone_events_3.issue_id)
  • Filter: (resource_weight_events.created_at <= '2020-08-17 23:59:59.999999+00'::timestamp with time zone)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=8,832 read=1,222 dirtied=8
  • I/O Timings: read=29.122