profile causing SQL query

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.

Quote · 26 Jan 2011

 

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.

OK we check it

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 26 Jan 2011

What is the Dolphin version you are running ? All friends related queries was rewritten in last versions...

Rules → http://www.boonex.com/terms
Quote · 26 Jan 2011

i am using the latest version.   7.04 so I cant explain why i am having this issue and it crashes the server.

Quote · 26 Jan 2011

Anymore thoughts on how to fix this

Quote · 26 Jan 2011

Any feedback on this issue from the we check on it crowd

Quote · 27 Jan 2011

 

Any feedback on this issue from the we check on it crowd

wait before AlexT will get you an answer!

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 27 Jan 2011

I couldn't reproduce such long query on 25K profiles, the longest query was 0.01 sec, but anyway query was optimized, to make it faster:

Ticket - http://www.boonex.com/trac/dolphin/ticket/2387

Changeset - http://www.boonex.com/trac/dolphin/changeset/14919

 

Also how many profiles do you have ? how many members are online at one time ?

Rules → http://www.boonex.com/terms
Quote · 28 Jan 2011

I have 5700 members and i could have as many as 100 or less online

Quote · 29 Jan 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.