Ok, that left join is probably causing some issues. There is a full table scan being done in the search by noting where it says ALL on t2, and the left join is compounding that.
With the latest search engine changes, this mod would probably be better served to run a different type of search query instead of the default one. Maybe one query to grab the latest topics and another to just loop through those and grab the info from the latest posts in those topics. This is probably not the best place to post this, probably be should be in another forum but I can give some tips here that can be continued elsewhere
This basic query would need to be modified to only select from the proper forums, but this would give you the last post and posterid for every topic ordering it so the most recent topics get returned first:
SELECT B_LastPostNum,B_LastPosterId
FROM w3t_Posts
WHERE B_Topic='1'
ORDER BY B_Last_Post DESC
Then you'd just need to loop through the results and grab the actual information for those particular posts. Would make for a quite complex modification I'm sure but on large forums with alot of posts the regular search engine would pretty much die as it's doing now on your forums.
Actually if you don't mind giving the subject of the topic itself instead of the last post in the topic, this query should do what you are looking for...
SELECT
t1.B_LastPostNum, t1.B_Main , t3.U_Username , t1.B_Subject , t1.B_Posted , t1.B_Board , t3.U_Color , t1.B_Reged , t1.B_Icon , t2.Bo_Title , t2.Bo_Read_Perm , t2.Bo_Cat , t1.B_Posterid , t1.B_Status , t1.B_AnonName , t1.B_Body FROM w3t_Posts AS t1 , w3t_Boards AS t2 , w3t_Users AS t3 WHERE
t1.B_Topic='1' AND t1.B_Approved = 'yes' AND t1.B_Board = t2.Bo_Keyword AND
t1.B_LastPosterId = t3.U_Number AND t1.B_Status <> 'M' AND t1.B_Board IN ('UBB1' , 'UBB2' , 'UBB4' , 'UBB5' , 'UBB6' , 'networking' , 'danews' , 'construction' , 'soho' , 'reviews' , 'security' , 'win2k' , 'unix' , 'test' , 'ports' , 'info' , 'mobile' , 'feedback' , 'photos' , 'unreg' , 'swap' , 'change' , 'help' , 'deals' , 'article' , 'software') AND ( (t1.B_Subject LIKE '%%' OR t1.B_Body LIKE '%%')) ORDER BY t1.B_Last_Post DESC LIMIT 26
That eliminates the last join and only returns one entry per topic. Ok, like I said, that's something to go on
