explain.depesz.com

PostgreSQL's explain analyze made readable

Result: doyD

Settings
# exclusive inclusive rows x rows loops node
1. 48.391 266.723 ↑ 1.0 21,443 1

Aggregate (cost=22,237.42..31,844.98 rows=21,473 width=1,124) (actual time=98.213..266.723 rows=21,443 loops=1)

  • Buffers: shared hit=13,791 read=3,481, temp read=339 written=341
2. 51.527 218.332 ↓ 1.0 154,246 1

Merge Join (cost=22,237.42..30,874.37 rows=151,175 width=1,120) (actual time=96.049..218.332 rows=154,246 loops=1)

  • Buffers: shared hit=13,791 read=3,481, temp read=339 written=341
3. 21.475 21.475 ↑ 1.0 21,443 1

Index Scan using users_pkey on users users (cost=0.29..5,924.89 rows=21,473 width=1,116) (actual time=0.011..21.475 rows=21,443 loops=1)

  • Filter: (users.deleted_at IS NULL)
  • Buffers: shared hit=11,984
4. 27.771 145.330 ↓ 1.0 153,030 1

Materialize (cost=22,237.13..23,001.81 rows=152,935 width=8) (actual time=96.03..145.33 rows=153,030 loops=1)

  • Buffers: shared hit=1,807 read=3,481, temp read=339 written=341
5. 70.916 117.559 ↓ 1.0 153,030 1

Sort (cost=22,237.13..22,619.47 rows=152,935 width=8) (actual time=96.028..117.559 rows=153,030 loops=1)

  • Sort Key: items.user_id
  • Sort Method: external merge Disk: 2,712kB
  • Buffers: shared hit=1,807 read=3,481, temp read=339 written=341
6. 46.643 46.643 ↓ 1.0 153,030 1

Seq Scan on items items (cost=0..6,974.47 rows=152,935 width=8) (actual time=0.007..46.643 rows=153,030 loops=1)

  • Filter: (items.deleted_at IS NULL)
  • Buffers: shared hit=1,807 read=3,481
Planning time : 0.297 ms
Execution time : 270.496 ms