We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Slow response in Newsfeed page - Newsfeed | Forum

Carlos
Carlos Jan 24 '15
Hello,

when more than 5 friends connections are established, the page slow down the load time to  7 or more seconds.

The query that causes this big delay is included at bottom. It needs an urgent optimization.

Thank you.

Best regards,
Carlos.

SELECT b.`id` FROM ( SELECT action.`id`, action.`entityId`, action.`entityType`, action.`pluginKey`, action.`data`, activity.timeStamp FROM bgs_newsfeed_action action INNER JOIN bgs_newsfeed_activity activity ON action.id = activity.actionId INNER JOIN `bgs_newsfeed_action_set` cactivity ON action.id = cactivity.actionId INNER JOIN `bgs_base_user` base_user_table_alias ON base_user_table_alias.`id` = `cactivity`.`userId` LEFT JOIN `bgs_base_user_suspend` base_user_suspend_table_alias ON base_user_suspend_table_alias.`userId` = `base_user_table_alias`.`id` INNER JOIN bgs_newsfeed_action_feed action_feed ON activity.id=action_feed.activityId LEFT JOIN bgs_newsfeed_follow follow ON action_feed.feedId = follow.feedId AND action_feed.feedType = follow.feedType WHERE (`base_user_suspend_table_alias`.`id` IS NULL) AND cactivity.userId = :u AND activity.status=:s AND activity.timeStamp<:st AND ( ( follow.userId=:u AND activity.visibility & :vf ) ) UNION SELECT action.`id`, action.`entityId`, action.`entityType`, action.`pluginKey`, action.`data`, activity.timeStamp FROM bgs_newsfeed_action action INNER JOIN bgs_newsfeed_activity activity ON action.id = activity.actionId INNER JOIN `bgs_newsfeed_action_set` cactivity ON action.id = cactivity.actionId INNER JOIN `bgs_base_user` base_user_table_alias ON base_user_table_alias.`id` = `cactivity`.`userId` LEFT JOIN `bgs_base_user_suspend` base_user_suspend_table_alias ON base_user_suspend_table_alias.`userId` = `base_user_table_alias`.`id` WHERE (`base_user_suspend_table_alias`.`id` IS NULL) AND cactivity.userId = :u AND activity.status=:s AND activity.timeStamp<:st AND ( ( activity.userId=:u AND activity.visibility & :va ) ) UNION SELECT action.`id`, action.`entityId`, action.`entityType`, action.`pluginKey`, action.`data`, activity.timeStamp FROM bgs_newsfeed_action action INNER JOIN bgs_newsfeed_activity activity ON action.id = activity.actionId INNER JOIN `bgs_newsfeed_action_set` cactivity ON action.id = cactivity.actionId INNER JOIN `bgs_base_user` base_user_table_alias ON base_user_table_alias.`id` = `cactivity`.`userId` LEFT JOIN `bgs_base_user_suspend` base_user_suspend_table_alias ON base_user_suspend_table_alias.`userId` = `base_user_table_alias`.`id` INNER JOIN bgs_newsfeed_action_feed action_feed ON activity.id=action_feed.activityId WHERE (`base_user_suspend_table_alias`.`id` IS NULL) AND cactivity.userId = :u AND activity.status=:s AND activity.timeStamp<:st AND ( ( action_feed.feedId=:u AND action_feed.feedType="user" AND activity.visibility & :vfeed ) ) UNION SELECT action.`id`, action.`entityId`, action.`entityType`, action.`pluginKey`, action.`data`, activity.timeStamp FROM bgs_newsfeed_action action INNER JOIN bgs_newsfeed_activity activity ON action.id = activity.actionId INNER JOIN `bgs_newsfeed_action_set` cactivity ON action.id = cactivity.actionId INNER JOIN `bgs_base_user` base_user_table_alias ON base_user_table_alias.`id` = `cactivity`.`userId` LEFT JOIN `bgs_base_user_suspend` base_user_suspend_table_alias ON base_user_suspend_table_alias.`userId` = `base_user_table_alias`.`id` INNER JOIN bgs_newsfeed_activity subscribe ON activity.actionId=subscribe.actionId and subscribe.activityType=:as AND subscribe.userId=:u WHERE (`base_user_suspend_table_alias`.`id` IS NULL) AND cactivity.userId = :u AND activity.status=:s AND activity.timeStamp<:st ) b GROUP BY b.`id` ORDER BY MAX(b.timeStamp) DESC LIMIT 0, 10
Oxwall Software
Oxwall Software Jan 26 '15
Please do the search before posting anything on the forum.http://www.oxwall.org/forum/topic/29251 Our developers are working the issue
You do not have permission to reply this topic