explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LCDr

Settings
# exclusive inclusive rows x rows loops node
1. 1.311 76.731 ↑ 1.5 1,128 1

Sort (cost=153,447.36..153,451.70 rows=1,736 width=76) (actual time=76.514..76.731 rows=1,128 loops=1)

  • Output: thread.id, thread.no, site.slug, thread.last_chk, (age(now(), (max(post.post_ts)))), (COALESCE(date_part('epoch'::text, (((thread.last_chk + (upd_period.upd_period)::interval))::timestamp with time zone - now())), '0'::double precision))
  • Sort Key: (COALESCE(date_part('epoch'::text, (((thread.last_chk + (upd_period.upd_period)::interval))::timestamp with time zone - now())), '0'::double precision))
  • Sort Method: quicksort Memory: 207kB
2. 13.734 75.420 ↑ 1.5 1,128 1

Nested Loop Left Join (cost=143.99..153,353.95 rows=1,736 width=76) (actual time=0.418..75.420 rows=1,128 loops=1)

  • Output: thread.id, thread.no, site.slug, thread.last_chk, age(now(), (max(post.post_ts))), COALESCE(date_part('epoch'::text, (((thread.last_chk + (upd_period.upd_period)::interval))::timestamp with time zone - now())), '0'::double precision)
  • Join Filter: ((age(now(), (max(post.post_ts))) >= (upd_period.min_age)::interval) AND (age(now(), (max(post.post_ts))) <= (upd_period.max_age)::interval))
  • Rows Removed by Join Filter: 10152
3. 1.301 60.558 ↑ 1.4 1,128 1

Nested Loop Left Join (cost=143.99..152,810.45 rows=1,562 width=60) (actual time=0.379..60.558 rows=1,128 loops=1)

  • Output: thread.id, thread.no, thread.last_chk, (max(post.post_ts)), site.slug
4. 0.353 3.985 ↑ 1.4 1,128 1

Nested Loop (cost=46.93..1,163.23 rows=1,562 width=52) (actual time=0.139..3.985 rows=1,128 loops=1)

  • Output: thread.id, thread.no, thread.last_chk, site.slug
5. 0.022 0.096 ↓ 1.6 8 1

Nested Loop (cost=0.14..13.92 rows=5 width=34) (actual time=0.028..0.096 rows=8 loops=1)

  • Output: board.id, site.slug
  • Inner Unique: true
  • Join Filter: (board.site_id = site.id)
  • Rows Removed by Join Filter: 16
6. 0.050 0.050 ↑ 1.0 24 1

Index Scan using board_id_key on ib.board (cost=0.14..12.50 rows=24 width=4) (actual time=0.006..0.050 rows=24 loops=1)

  • Output: board.id, board.site_id, board.name, board.slug, board.description, board.last_chk, board.crawl_all, board.chk_delay
7. 0.014 0.024 ↑ 1.0 1 24

Materialize (cost=0.00..1.07 rows=1 width=34) (actual time=0.001..0.001 rows=1 loops=24)

  • Output: site.slug, site.id
8. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on ib.site (cost=0.00..1.06 rows=1 width=34) (actual time=0.010..0.010 rows=1 loops=1)

  • Output: site.slug, site.id
  • Filter: (site.slug = 'fchan'::text)
  • Rows Removed by Filter: 4
9. 3.216 3.536 ↑ 2.3 141 8

Bitmap Heap Scan on ib.thread (cost=46.80..226.61 rows=325 width=22) (actual time=0.065..0.442 rows=141 loops=8)

  • Output: thread.id, thread.slug, thread.no, thread.subject, thread.pinned, thread.bump_limit, thread.deleted, thread.last_chk, thread.board_id, thread.status
  • Recheck Cond: (thread.board_id = board.id)
  • Filter: ((thread.status < 404) OR (thread.status > 404))
  • Rows Removed by Filter: 23
  • Heap Blocks: exact=559
10. 0.320 0.320 ↑ 13.1 179 8

Bitmap Index Scan on thread_pkey (cost=0.00..46.71 rows=2,351 width=0) (actual time=0.040..0.040 rows=179 loops=8)

  • Index Cond: (thread.board_id = board.id)
11. 9.024 55.272 ↑ 1.0 1 1,128

Aggregate (cost=97.06..97.07 rows=1 width=8) (actual time=0.049..0.049 rows=1 loops=1,128)

  • Output: max(post.post_ts)
12. 46.248 46.248 ↑ 6.1 49 1,128

Index Scan using post_th_id_idx on ib.post (cost=0.43..96.30 rows=301 width=8) (actual time=0.015..0.041 rows=49 loops=1,128)

  • Output: post.id, post.thread_id, post.no, post.post_ts, post.com, post.name, post.email, post.tripcode, post.capcode, post.tags, post.subject, post.deleted, post.fileposts
  • Index Cond: (post.thread_id = thread.id)
13. 1.113 1.128 ↑ 1.0 10 1,128

Materialize (cost=0.00..1.15 rows=10 width=12) (actual time=0.000..0.001 rows=10 loops=1,128)

  • Output: upd_period.upd_period, upd_period.min_age, upd_period.max_age
14. 0.015 0.015 ↑ 1.0 10 1

Seq Scan on ib.upd_period (cost=0.00..1.10 rows=10 width=12) (actual time=0.014..0.015 rows=10 loops=1)

  • Output: upd_period.upd_period, upd_period.min_age, upd_period.max_age
Planning time : 0.975 ms
Execution time : 76.934 ms