mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
Improved performance for UpdateContacts
This commit is contained in:
parent
e7880cd37d
commit
08cd651a03
1 changed files with 5 additions and 3 deletions
|
@ -55,9 +55,11 @@ class UpdateContacts
|
|||
$ids = self::getContactsToUpdate($condition, [], $limit);
|
||||
Logger::info('Fetched federated user contacts', ['count' => count($ids)]);
|
||||
|
||||
$conditions = ["`id` IN (SELECT `author-id` FROM `post-user`)", "`id` IN (SELECT `owner-id` FROM `post-user`)",
|
||||
"`id` IN (SELECT `causer-id` FROM `post-user`)", "`id` IN (SELECT `cid` FROM `post-tag`)",
|
||||
"`id` IN (SELECT `cid` FROM `user-contact`)"];
|
||||
$conditions = ["`id` IN (SELECT `author-id` FROM `post-user` WHERE `author-id` = `contact`.`id`)",
|
||||
"`id` IN (SELECT `owner-id` FROM `post-user` WHERE `owner-id` = `contact`.`id`)",
|
||||
"`id` IN (SELECT `causer-id` FROM `post-user` WHERE `causer-id` = `contact`.`id`)",
|
||||
"`id` IN (SELECT `cid` FROM `post-tag` WHERE `cid` = `contact`.`id`)",
|
||||
"`id` IN (SELECT `cid` FROM `user-contact` WHERE `cid` = `contact`.`id`)"];
|
||||
|
||||
foreach ($conditions as $contact_condition) {
|
||||
$condition = DBA::mergeConditions($base_condition,
|
||||
|
|
Loading…
Reference in a new issue