XF 1.4 Question about this slow query

imthebest

Well-known member
Hi,

The following slow query got logged:

Code:
# 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?

Thanks,
Super120
 
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.
 
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).
 
Top Bottom