I'm having issues on my server with a huge amount of slow queries like this one:
PHP Code:
SELECT postid, visible, userid
FROM post AS post
WHERE threadid = 124608
AND visible IN (1
,2
)
ORDER BY dateline;
Only thing that changed is the threadid.
I have query times of 20-50 seconds on each of these queries. It's bogging down the server.
So how can that code be optimized further? What about separating the dateline ordering into a php based sorting (array sort).