From 66f427db5ea1c27f247ed329521695bc34a8fdd6 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 15 Oct 2013 02:33:35 -0700 Subject: directory sync optimisations to save redundant processing --- include/poller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/poller.php') diff --git a/include/poller.php b/include/poller.php index 48959fe61..94ca99e54 100644 --- a/include/poller.php +++ b/include/poller.php @@ -242,7 +242,7 @@ function poller_run($argv, $argc){ } if($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) { - $r = q("select * from updates where not ( ud_flags & %d ) and ud_addr != '' and ( ud_last = '0000-00-00 00:00:00' OR ud_last > UTC_TIMESTAMP() - INTERVAL 7 DAY ) ", + $r = q("select distinct ud_addr, updates.* from updates where not ( ud_flags & %d ) and ud_addr != '' and ( ud_last = '0000-00-00 00:00:00' OR ud_last > UTC_TIMESTAMP() - INTERVAL 7 DAY ) group by ud_addr ", intval(UPDATE_FLAGS_UPDATED) ); if($r) { -- cgit v1.2.3