mirror of
https://github.com/friendica/friendica
synced 2025-04-25 12:30:11 +00:00
Some more changed indexes and improved queries
This commit is contained in:
parent
85397f3bb9
commit
e16afc0450
3 changed files with 39 additions and 11 deletions
|
@ -239,11 +239,13 @@ function cron_poll_contacts($argc, $argv) {
|
|||
: ''
|
||||
);
|
||||
|
||||
$contacts = q("SELECT `contact`.`id` FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
||||
WHERE `rel` IN (%d, %d) AND `poll` != '' AND `network` IN ('%s', '%s', '%s', '%s', '%s', '%s')
|
||||
$sql_extra
|
||||
AND NOT `self` AND NOT `contact`.`blocked` AND NOT `contact`.`readonly` AND NOT `contact`.`archive`
|
||||
AND NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql ORDER BY RAND()",
|
||||
$contacts = q("SELECT `contact`.`id` FROM `user`
|
||||
STRAIGHT_JOIN `contact`
|
||||
ON `contact`.`uid` = `user`.`uid` AND `contact`.`rel` IN (%d, %d) AND `contact`.`poll` != ''
|
||||
AND `contact`.`network` IN ('%s', '%s', '%s', '%s', '%s', '%s') $sql_extra
|
||||
AND NOT `contact`.`self` AND NOT `contact`.`blocked` AND NOT `contact`.`readonly`
|
||||
AND NOT `contact`.`archive`
|
||||
WHERE NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql ORDER BY RAND()",
|
||||
intval(CONTACT_IS_SHARING),
|
||||
intval(CONTACT_IS_FRIEND),
|
||||
dbesc(NETWORK_DFRN),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue