explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wtlHN

Settings
# exclusive inclusive rows x rows loops node
1. 50.387 2,945.288 ↓ 139.0 139 1

Unique (cost=38.06..38.07 rows=1 width=8) (actual time=2,766.696..2,945.288 rows=139 loops=1)

  • Buffers: shared hit=3582543 read=9 dirtied=105
2. 302.969 2,894.901 ↓ 695,656.0 695,656 1

Sort (cost=38.06..38.06 rows=1 width=8) (actual time=2,766.695..2,894.901 rows=695,656 loops=1)

  • Sort Key: sentry_activity.group_id
  • Sort Method: quicksort Memory: 57185kB
  • Buffers: shared hit=3582543 read=9 dirtied=105
3. 222.739 2,591.932 ↓ 695,656.0 695,656 1

Nested Loop (cost=1.56..38.05 rows=1 width=8) (actual time=0.124..2,591.932 rows=695,656 loops=1)

  • Buffers: shared hit=3582543 read=9 dirtied=105
4. 78.217 282.225 ↓ 695,656.0 695,656 1

Nested Loop (cost=0.99..33.53 rows=1 width=8) (actual time=0.109..282.225 rows=695,656 loops=1)

  • Buffers: shared hit=87137 read=9
5. 0.062 0.062 ↓ 2.7 19 1

Index Scan using sentry_project_organization_id on sentry_project (cost=0.42..12.14 rows=7 width=8) (actual time=0.015..0.062 rows=19 loops=1)

  • Index Cond: (organization_id = 262117)
  • Buffers: shared hit=22
6. 203.946 203.946 ↓ 6,102.2 36,613 19

Index Only Scan using sentry_activity_weekly_report_jtcunning on sentry_activity (cost=0.56..3.00 rows=6 width=16) (actual time=0.011..10.734 rows=36,613 loops=19)

  • Index Cond: ((project_id = sentry_project.id) AND (user_id = 436965) AND (datetime >= '2020-03-16 00:00:00+00'::timestamp with time zone) AND (datetime < '2020-03-23 00:00:00+00'::timestamp with time zone))
  • Heap Fetches: 50420
  • Buffers: shared hit=87115 read=9
7. 2,086.968 2,086.968 ↑ 1.0 1 695,656

Index Scan using sentry_groupedmessage_pkey on sentry_groupedmessage (cost=0.57..4.51 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=695,656)

  • Index Cond: (id = sentry_activity.group_id)
  • Filter: (status = 1)
  • Buffers: shared hit=3495406 dirtied=105
Planning time : 0.809 ms
Execution time : 2,951.892 ms