From 370d8d7063643b277fab6a0ba8b9134b2a5a2e56 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 12 Oct 2013 08:22:49 +0200 Subject: [PATCH] Reverting a forced index. It was good for a profile with many entries - but not on a profile with only a few items. --- mod/profile.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/profile.php b/mod/profile.php index c5da0ebed3..f0f5d3623e 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -276,8 +276,10 @@ function profile_content(&$a, $update = 0) { $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage'])); + // FROM `item` FORCE INDEX (created, uid) LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` + $r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact-uid` - FROM `item` FORCE INDEX (created, uid) LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` + FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 1 -- 2.39.5