Code:
SELECT * FROM `filedata`;
# Time: 171007 13:22:30
# User@Host: ###### @ localhost []
# Thread_id: 318579 Schema: ##### QC_hit: No
# Query_time: 7.152743 Lock_time: 0.000120 Rows_sent: 31 Rows_examined: 558
# Rows_affected: 0
SET timestamp=1507396950;
SELECT post.pagetext AS preview,
thread.threadid, thread.title AS threadtitle, thread.forumid, thread.pollid, thread.open, thread.postusername, thread.$
thread.dateline, thread.notes, thread.visible, thread.sticky, thread.votetotal, thread.attach, thread.lastpost, thread$
thread.prefixid, thread.taglist, thread.hiddencount, thread.deletedcount, user.userid,
user.membergroupids, user.infractiongroupids, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlis$
user.lastactivity, user.lastvisit, IF(user.options & 512, 1, 0) AS invisible
, (SELECT COUNT(*) FROM starposts AS starposts WHERE starposts.userid = 0 AND starposts.threadid = thread.threadid) $
FROM thread AS thread
LEFT JOIN user AS user ON (user.userid = thread.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid$
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
WHERE thread.threadid IN (0,32490,26504,31904,31744,31657,31635,31567,27852,31374,31276,27962,31157,30175,29848,29692,29680,29$
ORDER BY thread.sticky DESC, lastpost DESC;
The reason it's taking so long, is that it's using LEFT JOIN commands that will take information from a previous query, and use it into that specific query which can really slow your server down.