SELECT p.ID AS `friendID` , p.NickName
FROM `Profiles` AS p
INNER JOIN (SELECT IF( '5' = f.`ID
A simple request to that page is spawning a SQL query
That takes sometimes as long as a 100 seconds to complete. It is locking that table. Then, if others go to that page, their request wont be accomplished until the first one is done (which is taking very long) and I run out of memory (a lot of requests on standby)
i am running 6 gigs of memory and the boonex profiles are original no modifications can someone help or suggest a fix
SELECT COUNT(*)
FROM `Profiles` AS p
INNER JOIN (SELECT IF( '5' = f.`ID` , f.`Profile` , f.`ID` ) AS `ID`
FROM `sys_friend_list` AS `f`
WHERE 1 AND (f.`Profile` = '5' OR f.`ID` = '5') AND `Check` = 1) AS `f1` ON (`f1`.`ID` = `p`.`ID`)
INNER JOIN (SELECT IF( '12' = f.`ID` , f.`Profile` , f.`ID` ) AS `ID`
FROM `sys_friend_list` AS `f`
WHERE 1 AND (f.`Profile` = '12' OR f.`ID` = '12') AND `Check` = 1) AS `f2` ON (`f2`.`ID` = `p`.`ID`);
is the full query.
