explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G19GL

Settings
# exclusive inclusive rows x rows loops node
1. 1.806 1,036.102 ↓ 0.0 0 1

Nested Loop Left Join (cost=125,611.02..126,849.35 rows=985 width=157) (actual time=1,036.102..1,036.102 rows=0 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: 8320
  • Filter: (((now() - (thread.last_chk)::timestamp with time zone) > (upd_period.upd_period)::interval) OR (thread.last_chk IS NULL))
  • Rows Removed by Filter: 924
2. 1.945 1,034.296 ↑ 2.9 924 1

Hash Right Join (cost=125,611.02..125,917.22 rows=2,660 width=173) (actual time=1,027.051..1,034.296 rows=924 loops=1)

  • Hash Cond: (post.thread_id = thread.id)
3. 802.390 1,020.276 ↓ 2.2 27,366 1

HashAggregate (cost=124,711.10..124,835.05 rows=12,395 width=24) (actual time=1,014.961..1,020.276 rows=27,366 loops=1)

  • Group Key: post.thread_id
4. 217.886 217.886 ↓ 1.0 2,969,056 1

Seq Scan on post (cost=0.00..87,631.60 rows=2,966,360 width=16) (actual time=0.007..217.886 rows=2,969,056 loops=1)

5. 0.480 12.075 ↑ 2.9 924 1

Hash (cost=866.67..866.67 rows=2,660 width=157) (actual time=12.075..12.075 rows=924 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 168kB
6. 1.294 11.595 ↑ 2.9 924 1

Hash Join (cost=2.60..866.67 rows=2,660 width=157) (actual time=0.079..11.595 rows=924 loops=1)

  • Hash Cond: (board.site_id = site.id)
7. 3.066 10.278 ↑ 1.0 6,580 1

Hash Join (cost=1.52..844.91 rows=6,650 width=127) (actual time=0.039..10.278 rows=6,580 loops=1)

  • Hash Cond: (thread.board_id = board.id)
8. 7.192 7.192 ↑ 1.0 6,580 1

Seq Scan on thread (cost=0.00..822.73 rows=6,650 width=93) (actual time=0.008..7.192 rows=6,580 loops=1)

  • Filter: (status IS DISTINCT FROM 404)
  • Rows Removed by Filter: 21165
9. 0.008 0.020 ↑ 1.0 23 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.012 0.012 ↑ 1.0 23 1

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

11. 0.008 0.023 ↑ 1.0 2 1

Hash (cost=1.06..1.06 rows=2 width=34) (actual time=0.023..0.023 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.015 0.015 ↑ 1.0 2 1

Seq Scan on site (cost=0.00..1.06 rows=2 width=34) (actual time=0.012..0.015 rows=2 loops=1)

  • Filter: (slug = ANY ('{4chan,8chan}'::text[]))
  • Rows Removed by Filter: 3
13. 0.000 0.000 ↑ 1.0 10 924

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

14. 0.006 0.006 ↑ 1.0 10 1

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