explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nnoT

Settings
# exclusive inclusive rows x rows loops node
1. 0.034 439,151.051 ↓ 433.0 433 1

Limit (cost=29,423.08..29,423.09 rows=1 width=19) (actual time=439,138.404..439,151.051 rows=433 loops=1)

  • Buffers: shared hit=30830168 read=2
2. 6.395 439,151.017 ↓ 433.0 433 1

Group (cost=29,423.08..29,423.09 rows=1 width=19) (actual time=439,138.404..439,151.017 rows=433 loops=1)

  • Group Key: requester_organizations.name
  • Buffers: shared hit=30830168 read=2
3. 93.137 439,144.622 ↓ 79,961.0 79,961 1

Sort (cost=29,423.08..29,423.09 rows=1 width=19) (actual time=439,138.403..439,144.622 rows=79,961 loops=1)

  • Sort Key: requester_organizations.name
  • Sort Method: quicksort Memory: 8199kB
  • Buffers: shared hit=30830168 read=2
4. 121,674.719 439,051.485 ↓ 79,961.0 79,961 1

Nested Loop (cost=207.10..29,423.07 rows=1 width=19) (actual time=116.007..439,051.485 rows=79,961 loops=1)

  • Join Filter: (requesters.organization_id = requester_organizations.id)
  • Rows Removed by Join Filter: 1724869063
  • Buffers: shared hit=30830168 read=2
5. 230.267 3,441.468 ↓ 339,023.0 339,023 1

Nested Loop (cost=207.10..29,210.72 rows=1 width=8) (actual time=111.421..3,441.468 rows=339,023 loops=1)

  • Buffers: shared hit=2013213 read=2
6. 75.586 1,516.086 ↓ 339,023.0 339,023 1

Nested Loop (cost=206.67..29,209.98 rows=1 width=8) (actual time=111.409..1,516.086 rows=339,023 loops=1)

  • Buffers: shared hit=653879
7. 0.412 0.412 ↓ 244.0 244 1

Index Scan using users_role on users assignees (cost=0.43..8.88 rows=1 width=8) (actual time=0.014..0.412 rows=244 loops=1)

  • Index Cond: (role = ANY ('{Admin,Agent}'::text[]))
  • Buffers: shared hit=275
8. 1,310.768 1,440.088 ↑ 1.7 1,389 244

Bitmap Heap Scan on tickets (cost=206.24..29,176.89 rows=2,421 width=16) (actual time=1.481..5.902 rows=1,389 loops=244)

  • Recheck Cond: (assignee_id = assignees.id)
  • Filter: ((created_at >= '2017-01-01 08:00:00'::timestamp without time zone) AND (created_at < '2019-03-01 08:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 2514
  • Heap Blocks: exact=644602
  • Buffers: shared hit=653604
9. 129.320 129.320 ↑ 2.1 3,908 244

Bitmap Index Scan on tickets_assignee_id (cost=0.00..205.64 rows=8,161 width=0) (actual time=0.530..0.530 rows=3,908 loops=244)

  • Index Cond: (assignee_id = assignees.id)
  • Buffers: shared hit=9002
10. 1,695.115 1,695.115 ↑ 1.0 1 339,023

Index Scan using users_pkey on users requesters (cost=0.43..0.74 rows=1 width=16) (actual time=0.004..0.005 rows=1 loops=339,023)

  • Index Cond: (id = tickets.requester_id)
  • Buffers: shared hit=1359334 read=2
11. 313,935.298 313,935.298 ↑ 1.0 5,088 339,023

Seq Scan on organizations requester_organizations (cost=0.00..148.75 rows=5,088 width=27) (actual time=0.002..0.926 rows=5,088 loops=339,023)

  • Filter: (status = 'Active'::text)
  • Rows Removed by Filter: 12
  • Buffers: shared hit=28816955