Real problem in the wall

Hello,

Another hug problem is the wall, the sql request take long time to terminate when there is so many friends and wall posts.

That way if there is just 60 user online the server will be down.

You can think about another solotion to the wall.

As i saw the wall load all the available wall posts of all the members in this request, i am right ? if so you can think about a solution like facebook to load wall posts by date not by page to prevent the load of all the wall posts.

Here is an exemple:

------------------------------------------------------

SELECT `bx_wall_events`.`id` AS `id`, `bx_wall_events`.`owner_id` AS `owner_id`, `bx_wall_events`.`object_id` AS `object_id`, `bx_wall_events`.`type` AS `type`, `bx_wall_events`.`action` AS `action`, `bx_wall_events`.`content` AS `content`, `bx_wall_events`.`title` AS `title`, `bx_wall_events`.`description` AS `description`, `bx_wall_events`.`date` AS `dates`, DATE_FORMAT(FROM_UNIXTIME(`bx_wall_events`.`date`), '%d.%m.%Y') AS `print_date`, DAYOFYEAR(FROM_UNIXTIME(`bx_wall_events`.`date`)) AS `days`, DAYOFYEAR(NOW()) AS `today`, (UNIX_TIMESTAMP() - `bx_wall_events`.`date`) AS `ago` FROM `bx_wall_events` WHERE `bx_wall_events`.`owner_id` = '1' or `bx_wall_events`.`object_id` = '1' OR `bx_wall_events`.`object_id` = '3' OR `bx_wall_events`.`owner_id` = '3' OR `bx_wall_events`.`object_id` = '6' OR `bx_wall_events`.`owner_id` = '6' OR `bx_wall_events`.`object_id` = '10' OR `bx_wall_events`.`owner_id` = '10' OR `bx_wall_events`.`object_id` = '12' OR `bx_wall_events`.`owner_id` = '12' OR `bx_wall_events`.`object_id` = '26' OR `bx_wall_events`.`owner_id` = '26' OR `bx_wall_events`.`object_id` = '51' OR `bx_wall_events`.`owner_id` = '51' OR `bx_wall_events`.`object_id` = '143' OR `bx_wall_events`.`owner_id` = '143' OR `bx_wall_events`.`object_id` = '152' OR `bx_wall_events`.`owner_id` = '152' OR `bx_wall_events`.`object_id` = '156' OR `bx_wall_events`.`owner_id` = '156' OR `bx_wall_events`.`object_id` = '165' OR `bx_wall_events`.`owner_id` = '165' OR `bx_wall_events`.`object_id` = '169' OR `bx_wall_events`.`owner_id` = '169' OR `bx_wall_events`.`object_id` = '171' OR `bx_wall_events`.`owner_id` = '171' OR `bx_wall_events`.`object_id` = '176' OR `bx_wall_events`.`owner_id` = '176' OR `bx_wall_events`.`object_id` = '178' OR `bx_wall_events`.`owner_id` = '178' OR `bx_wall_events`.`object_id` = '179' OR `bx_wall_events`.`owner_id` = '179' OR `bx_wall_events`.`object_id` = '943' OR `bx_wall_events`.`owner_id` = '943' OR `bx_wall_events`.`object_id` = '1219' OR `bx_wall_events`.`owner_id` = '1219' OR `bx_wall_events`.`object_id` = '3582' OR `bx_wall_events`.`owner_id` = '3582' OR `bx_wall_events`.`owner_id` = '4' OR `bx_wall_events`.`object_id` = '4' OR `bx_wall_events`.`owner_id` = '5' OR `bx_wall_events`.`object_id` = '5' OR `bx_wall_events`.`owner_id` = '2' OR `bx_wall_events`.`object_id` = '2' OR `bx_wall_events`.`owner_id` = '83' OR `bx_wall_events`.`object_id` = '83' OR `bx_wall_events`.`owner_id` = '151' OR `bx_wall_events`.`object_id` = '151' OR `bx_wall_events`.`owner_id` = '147' OR `bx_wall_events`.`object_id` = '147' OR `bx_wall_events`.`owner_id` = '656' OR `bx_wall_events`.`object_id` = '656' OR `bx_wall_events`.`owner_id` = '959' OR `bx_wall_events`.`object_id` = '959' OR `bx_wall_events`.`owner_id` = '56' OR `bx_wall_events`.`object_id` = '56' OR `bx_wall_events`.`owner_id` = '1130' OR `bx_wall_events`.`object_id` = '1130' OR `bx_wall_events`.`owner_id` = '1359' OR `bx_wall_events`.`object_id` = '1359' OR `bx_wall_events`.`owner_id` = '1367' OR `bx_wall_events`.`object_id` = '1367' OR `bx_wall_events`.`owner_id` = '1513' OR `bx_wall_events`.`object_id` = '1513' OR `bx_wall_events`.`owner_id` = '1333' OR `bx_wall_events`.`object_id` = '1333' OR `bx_wall_events`.`owner_id` = '246' OR `bx_wall_events`.`object_id` = '246' OR `bx_wall_events`.`owner_id` = '1708' OR `bx_wall_events`.`object_id` = '1708' OR `bx_wall_events`.`owner_id` = '2030' OR `bx_wall_events`.`object_id` = '2030' OR `bx_wall_events`.`owner_id` = '2119' OR `bx_wall_events`.`object_id` = '2119' OR `bx_wall_events`.`owner_id` = '2192' OR `bx_wall_events`.`object_id` = '2192' OR `bx_wall_events`.`owner_id` = '2196' OR `bx_wall_events`.`object_id` = '2196' OR `bx_wall_events`.`owner_id` = '1953' OR `bx_wall_events`.`object_id` = '1953' OR `bx_wall_events`.`owner_id` = '2851' OR `bx_wall_events`.`object_id` = '2851' OR `bx_wall_events`.`owner_id` = '2931' OR `bx_wall_events`.`object_id` = '2931' OR `bx_wall_events`.`owner_id` = '2848' OR `bx_wall_events`.`object_id` = '2848' OR `bx_wall_events`.`owner_id` = '3193' OR `bx_wall_events`.`object_id` = '3193' OR `bx_wall_events`.`owner_id` = '3295' OR `bx_wall_events`.`object_id` = '3295' OR `bx_wall_events`.`owner_id` = '3298' OR `bx_wall_events`.`object_id` = '3298' OR `bx_wall_events`.`owner_id` = '3413' OR `bx_wall_events`.`object_id` = '3413' OR `bx_wall_events`.`owner_id` = '3524' OR `bx_wall_events`.`object_id` = '3524' OR `bx_wall_events`.`owner_id` = '3598' OR `bx_wall_events`.`object_id` = '3598' OR `bx_wall_events`.`owner_id` = '615' OR `bx_wall_events`.`object_id` = '615' OR `bx_wall_events`.`owner_id` = '3895' OR `bx_wall_events`.`object_id` = '3895' OR `bx_wall_events`.`owner_id` = '4292' OR `bx_wall_events`.`object_id` = '4292' OR `bx_wall_events`.`owner_id` = '5249' OR `bx_wall_events`.`object_id` = '5249' OR `bx_wall_events`.`owner_id` = '4868' OR `bx_wall_events`.`object_id` = '4868' OR `bx_wall_events`.`owner_id` = '5841' OR `bx_wall_events`.`object_id` = '5841' OR `bx_wall_events`.`owner_id` = '7383' OR `bx_wall_events`.`object_id` = '7383' OR `bx_wall_events`.`owner_id` = '8371' OR `bx_wall_events`.`object_id` = '8371' OR `bx_wall_events`.`owner_id` = '7924' OR `bx_wall_events`.`object_id` = '7924' OR `bx_wall_events`.`owner_id` = '9701' OR `bx_wall_events`.`object_id` = '9701' OR `bx_wall_events`.`owner_id` = '11312' OR `bx_wall_events`.`object_id` = '11312' OR `bx_wall_events`.`owner_id` = '15134' OR `bx_wall_events`.`object_id` = '15134' OR `bx_wall_events`.`owner_id` = '25228' OR `bx_wall_events`.`object_id` = '25228' OR `bx_wall_events`.`owner_id` = '17443' OR `bx_wall_events`.`object_id` = '17443' OR `bx_wall_events`.`owner_id` = '18128' OR `bx_wall_events`.`object_id` = '18128' OR `bx_wall_events`.`owner_id` = '18683' OR `bx_wall_events`.`object_id` = '18683' OR `bx_wall_events`.`owner_id` = '13477' OR `bx_wall_events`.`object_id` = '13477' OR `bx_wall_events`.`owner_id` = '20210' OR `bx_wall_events`.`object_id` = '20210' OR `bx_wall_events`.`owner_id` = '21336' OR `bx_wall_events`.`object_id` = '21336' OR `bx_wall_events`.`owner_id` = '23060' OR `bx_wall_events`.`object_id` = '23060' OR `bx_wall_events`.`owner_id` = '25104' OR `bx_wall_events`.`object_id` = '25104' OR `bx_wall_events`.`owner_id` = '25449' OR `bx_wall_events`.`object_id` = '25449' OR `bx_wall_events`.`owner_id` = '26405' OR `bx_wall_events`.`object_id` = '26405' OR `bx_wall_events`.`owner_id` = '25438' OR `bx_wall_events`.`object_id` = '25438'  ORDER BY `bx_wall_events`.`date` DESC LIMIT 0, 10

Quote · 22 Oct 2010

Hello, ok we will check it, thank you !

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 22 Oct 2010

Thank you for the report.

Please try to execute the following queries:

 

ALTER TABLE `bx_wall_events` CHANGE `owner_id` `owner_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';

ALTER TABLE `bx_wall_events` ADD INDEX ( `owner_id` );

 

If it helps we will include this fix in the next update.

Rules → http://www.boonex.com/terms
Quote · 22 Oct 2010

Thank you , i think this is helping a little, i am thinking if it possible to list wall events by date like fb ? this will be great.

 

With all my respect.

Quote · 22 Oct 2010

Hello,

 

When the number of wall events is not too high there is no problem but with wall posts >> 600 this is a big problem the query takes more than 2s.

So i think It must limit the posts by date like facebook.

 

With all my respect.

Quote · 22 Oct 2010

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

Please try to add one more index:

ALTER TABLE `bx_wall_events` ADD INDEX ( `object_id` )

And please report if it is still > 2sec after applying above fix ?

Rules → http://www.boonex.com/terms
Quote · 25 Oct 2010
 
 
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.