explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6yM7

Settings
# exclusive inclusive rows x rows loops node
1. 208.178 10,192.155 ↑ 1.6 224,203 1

Nested Loop (cost=389,653.46..1,043,925.01 rows=366,176 width=87) (actual time=7,151.770..10,192.155 rows=224,203 loops=1)

  • Buffers: shared hit=1085869 read=140442, temp read=52708 written=52678
2. 165.761 9,087.165 ↑ 1.6 224,203 1

Hash Join (cost=389,653.03..771,826.39 rows=366,176 width=55) (actual time=7,151.749..9,087.165 rows=224,203 loops=1)

  • Hash Cond: (operation.session_id = s.id)
  • Buffers: shared hit=187762 read=140442, temp read=52708 written=52678
3. 1,316.211 8,386.824 ↑ 1.7 224,203 1

Hash Join (cost=363,641.71..740,757.94 rows=372,099 width=51) (actual time=6,613.764..8,386.824 rows=224,203 loops=1)

  • Hash Cond: (operation.rpi_id = r.id)
  • Buffers: shared hit=174528 read=140442, temp read=52708 written=52678
4. 507.361 606.778 ↓ 1.3 536,093 1

Bitmap Heap Scan on operation (cost=14,794.78..321,369.78 rows=397,355 width=16) (actual time=146.677..606.778 rows=536,093 loops=1)

  • Recheck Cond: (operation_type = 5)
  • Filter: (invoice_id IS NOT NULL)
  • Rows Removed by Filter: 243146
  • Heap Blocks: exact=172136
  • Buffers: shared hit=174268
5. 99.417 99.417 ↑ 1.0 779,239 1

Bitmap Index Scan on idx_operation_type (cost=0.00..14,695.44 rows=795,600 width=0) (actual time=99.417..99.417 rows=779,239 loops=1)

  • Index Cond: (operation_type = 5)
  • Buffers: shared hit=2132
6. 3,045.777 6,463.835 ↑ 1.0 6,652,308 1

Hash (cost=207,225.08..207,225.08 rows=6,652,308 width=43) (actual time=6,463.835..6,463.835 rows=6,652,308 loops=1)

  • Buckets: 1048576 Batches: 16 Memory Usage: 40720kB
  • Buffers: shared hit=260 read=140442, temp written=51733
7. 3,418.058 3,418.058 ↑ 1.0 6,652,308 1

Seq Scan on session_rpi r (cost=0.00..207,225.08 rows=6,652,308 width=43) (actual time=0.053..3,418.058 rows=6,652,308 loops=1)

  • Buffers: shared hit=260 read=140442
8. 243.091 534.580 ↑ 1.0 565,118 1

Hash (cost=18,947.32..18,947.32 rows=565,120 width=20) (actual time=534.580..534.580 rows=565,118 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 35123kB
  • Buffers: shared hit=13234
9. 291.489 291.489 ↑ 1.0 565,118 1

Seq Scan on session s (cost=0.00..18,947.32 rows=565,120 width=20) (actual time=0.014..291.489 rows=565,118 loops=1)

  • Filter: (finished_at IS NOT NULL)
  • Rows Removed by Filter: 6214
  • Buffers: shared hit=13234
10. 896.812 896.812 ↑ 1.0 1 224,203

Index Scan using rpi_assignment_pkey on rpi_assignment ra (cost=0.44..0.73 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=224,203)

  • Index Cond: (id = r.assignment_id)
  • Buffers: shared hit=898107