Jake B.
Well-known member
Hey Chris,
Didn't really look into this too much, but every time this ran for a user it caused a fairly substantial bump in page generation (about an additional second) from this query:
Is there a reason it selects the thread id and post id instead of just doing a count? Keeping in mind, I didn't really look into what else this add-on does so I may be completely wrong in thinking that would work
Didn't really look into this too much, but every time this ran for a user it caused a fairly substantial bump in page generation (about an additional second) from this query:
Code:
SELECT thread.thread_id, post.post_id
FROM xf_post AS post
INNER JOIN xf_thread AS thread ON
(post.thread_id = thread.thread_id AND thread.node_id IN (' . $this->_getDb()->quote($forumIds) . '))
INNER JOIN xf_forum AS forum ON
(forum.node_id = thread.node_id AND forum.find_new = 1)
LEFT JOIN xf_thread_read AS thread_read ON
(thread_read.thread_id = thread.thread_id AND thread_read.user_id = ?)
LEFT JOIN xf_forum_read AS forum_read ON
(forum_read.node_id = thread.node_id AND forum_read.user_id = ?)
WHERE post.post_date > ?
AND post.message_state = \'visible\'
AND thread.discussion_state = \'visible\'
AND post.post_date > GREATEST(
IF (thread_read.thread_read_date IS NULL, 0, thread_read.thread_read_date),
IF (forum_read.forum_read_date IS NULL, 0, forum_read.forum_read_date)
)
Is there a reason it selects the thread id and post id instead of just doing a count? Keeping in mind, I didn't really look into what else this add-on does so I may be completely wrong in thinking that would work
