explain.depesz.com

PostgreSQL's explain analyze made readable

Result: epNc

Settings
# exclusive inclusive rows x rows loops node
1. 4.533 1,179.940 ↓ 2.0 20,778 1

Hash Join (cost=125,811.12..128,949.41 rows=10,333 width=157) (actual time=1,093.177..1,179.940 rows=20,778 loops=1)

  • Hash Cond: (board.site_id = site.id)
2. 4.597 1,175.377 ↓ 2.0 20,778 1

Hash Join (cost=125,810.01..128,916.18 rows=10,333 width=127) (actual time=1,093.047..1,175.377 rows=20,778 loops=1)

  • Hash Cond: (thread.board_id = board.id)
3. 18.536 1,170.745 ↓ 2.0 20,778 1

Hash Right Join (cost=125,808.49..128,882.54 rows=10,333 width=93) (actual time=1,092.984..1,170.745 rows=20,778 loops=1)

  • Hash Cond: (post.thread_id = thread.id)
  • Filter: (((now() - (thread.last_chk)::timestamp with time zone) > (upd_period.upd_period)::interval) OR (thread.last_chk IS NULL))
  • Rows Removed by Filter: 6967
4. 51.675 1,136.933 ↓ 2.0 27,366 1

Nested Loop Left Join (cost=124,706.78..127,744.68 rows=13,772 width=12) (actual time=1,077.397..1,136.933 rows=27,366 loops=1)

  • Join Filter: (((max((now() - (post.post_ts)::timestamp with time zone))) >= (upd_period.min_age)::interval) AND ((max((now() - (post.post_ts)::timestamp with time zone))) <= (upd_period.max_age)::interval))
  • Rows Removed by Join Filter: 246294
5. 844.360 1,085.258 ↓ 2.2 27,366 1

HashAggregate (cost=124,706.78..124,830.73 rows=12,395 width=24) (actual time=1,077.378..1,085.258 rows=27,366 loops=1)

  • Group Key: post.thread_id
6. 240.898 240.898 ↓ 1.0 2,968,940 1

Seq Scan on post (cost=0.00..87,628.57 rows=2,966,257 width=16) (actual time=0.009..240.898 rows=2,968,940 loops=1)

7. 0.000 0.000 ↑ 1.0 10 27,366

Materialize (cost=0.00..1.15 rows=10 width=12) (actual time=0.000..0.000 rows=10 loops=27,366)

8. 0.007 0.007 ↑ 1.0 10 1

Seq Scan on upd_period (cost=0.00..1.10 rows=10 width=12) (actual time=0.006..0.007 rows=10 loops=1)

9. 9.040 15.276 ↑ 1.0 27,745 1

Hash (cost=752.98..752.98 rows=27,898 width=93) (actual time=15.276..15.276 rows=27,745 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 3991kB
10. 6.236 6.236 ↑ 1.0 27,745 1

Seq Scan on thread (cost=0.00..752.98 rows=27,898 width=93) (actual time=0.021..6.236 rows=27,745 loops=1)

11. 0.016 0.035 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=36) (actual time=0.035..0.035 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.019 0.019 ↑ 1.0 23 1

Seq Scan on board (cost=0.00..1.23 rows=23 width=36) (actual time=0.010..0.019 rows=23 loops=1)

13. 0.010 0.030 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=34) (actual time=0.030..0.030 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.020 0.020 ↑ 1.0 5 1

Seq Scan on site (cost=0.00..1.05 rows=5 width=34) (actual time=0.017..0.020 rows=5 loops=1)