explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IqcJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 1,066.623 ↑ 1.0 7 1

Sort (cost=69,478.08..69,478.10 rows=7 width=173) (actual time=1,066.616..1,066.623 rows=7 loops=1)

  • Sort Key: f.forum_order, f.forum_nev
  • Sort Method: quicksort Memory: 26kB
2. 0.033 1,066.596 ↑ 1.0 7 1

Nested Loop (cost=9,917.74..69,477.99 rows=7 width=173) (actual time=163.201..1,066.596 rows=7 loops=1)

3. 0.020 1,013.454 ↑ 1.0 7 1

Nested Loop (cost=9,917.06..69,453.70 rows=7 width=139) (actual time=162.875..1,013.454 rows=7 loops=1)

4. 0.017 0.233 ↑ 1.0 7 1

Nested Loop (cost=13.06..125.49 rows=7 width=131) (actual time=0.106..0.233 rows=7 loops=1)

5. 0.034 0.118 ↑ 1.0 7 1

Hash Right Join (cost=1.16..41.96 rows=7 width=123) (actual time=0.091..0.118 rows=7 loops=1)

  • Hash Cond: (lt.topic_id = f.link_topic_id)
6. 0.063 0.063 ↑ 1.0 53 1

Seq Scan on topics lt (cost=0.00..40.53 rows=53 width=19) (actual time=0.004..0.063 rows=53 loops=1)

7. 0.008 0.021 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=108) (actual time=0.020..0.021 rows=7 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.013 0.013 ↑ 1.0 7 1

Seq Scan on forums f (cost=0.00..1.07 rows=7 width=108) (actual time=0.010..0.013 rows=7 loops=1)

9. 0.098 0.098 ↑ 1.0 1 7

Aggregate (cost=11.90..11.91 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=7)

  • -> Index Only Scan using idx_topics_forum_id on topics topics_1 (cost=0.27..11.88 rows=9 width=0) (actual time=0.005..0.009 rows=8 loops=
  • Index Cond: (forum_id = f.forum_id)
  • Heap Fetches: 38
10. 11.872 1,013.201 ↑ 1.0 1 7

Aggregate (cost=9,904.00..9,904.01 rows=1 width=8) (actual time=144.742..144.743 rows=1 loops=7)

11. 93.660 1,001.329 ↑ 1.3 13,137 7

Hash Join (cost=32.08..9,860.94 rows=17,222 width=647) (actual time=0.202..143.047 rows=13,137 loops=7)

  • Hash Cond: (p.topic_id = t.topic_id)
12. 907.501 907.501 ↑ 1.0 90,985 7

Seq Scan on posts p (cost=0.00..9,570.11 rows=91,275 width=651) (actual time=0.025..129.643 rows=90,985 loops=7)

  • Filter: (post_state <> 'TOROLT2'::forum.post_state)
  • Rows Removed by Filter: 28,064
13. 0.042 0.168 ↑ 1.2 8 7

Hash (cost=31.95..31.95 rows=10 width=4) (actual time=0.024..0.024 rows=8 loops=7)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
14. 0.070 0.126 ↑ 1.2 8 7

Bitmap Heap Scan on topics t (cost=8.61..31.95 rows=10 width=4) (actual time=0.013..0.018 rows=8 loops=7)

  • Recheck Cond: ((f.link_topic_id = topic_id) OR (forum_id = f.forum_id))
  • Heap Blocks: exact=35
15. 0.014 0.056 ↓ 0.0 0 7

BitmapOr (cost=8.61..8.61 rows=10 width=0) (actual time=0.008..0.008 rows=0 loops=7)

16. 0.007 0.007 ↓ 0.0 0 7

Bitmap Index Scan on pkey_topics (cost=0.00..4.27 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=7)

  • Index Cond: (topic_id = f.link_topic_id)
17. 0.035 0.035 ↑ 1.1 8 7

Bitmap Index Scan on idx_topics_forum_id (cost=0.00..4.33 rows=9 width=0) (actual time=0.005..0.005 rows=8 loops=7)

  • Index Cond: (forum_id = f.forum_id)
18. 0.014 53.109 ↑ 1.0 1 7

Limit (cost=0.68..3.45 rows=1 width=21) (actual time=7.587..7.587 rows=1 loops=7)

19. 5.946 53.095 ↑ 17,222.0 1 7

Nested Loop (cost=0.68..47,661.90 rows=17,222 width=21) (actual time=7.585..7.585 rows=1 loops=7)

20. 16.303 16.303 ↑ 41.4 2,203 7

Index Scan Backward using pkey_posts on posts p_1 (cost=0.42..21,271.69 rows=91,275 width=25) (actual time=0.011..2.329 rows=2,203 loops=7)

  • Filter: (post_state <> 'TOROLT2'::forum.post_state)
  • Rows Removed by Filter: 823
21. 30.846 30.846 ↓ 0.0 0 15,423

Index Scan using pkey_topics on topics t_1 (cost=0.27..0.29 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=15,423)

  • Index Cond: (topic_id = p_1.topic_id)
  • Filter: ((f.link_topic_id = topic_id) OR (forum_id = f.forum_id))
  • Rows Removed by Filter: 1
Planning time : 1.121 ms
Execution time : 1,066.767 ms