• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Question about this slow query


Well-known member

The following slow query got logged:

# Query_time: 3.090897  Lock_time: 0.000024 Rows_sent: 25  Rows_examined: 224672
SET timestamp=1424548851;
SELECT thread.*
  user.*, IF(user.username IS NULL, thread.username, user.username) AS username,
  NULL AS thread_read_date,
  0 AS thread_is_watched,
  0 AS user_post_count
  FROM xf_thread AS thread
  LEFT JOIN xf_user AS user ON
  (user.user_id = thread.user_id)
  WHERE (thread.node_id = 149) AND (thread.sticky = 0) AND (thread.discussion_state IN ('visible'))
  ORDER BY thread.title DESC
  LIMIT 25 OFFSET 74350;
May I know what produces this slow query?



Well-known member
Is it normal to have a query of 3 seconds for that simple operation?

Although it's the first and only occurrence of that slow query... maybe at the time my SSD was busy.


XenForo developer
Staff member
Due to how MySQL works, that won't be a particularly fast query (getting all the records, sorting them, then throwing away the data it doesn't need).