From 2906d8dd2e4eac558854d84ff2704f063c5f297e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 30 Oct 2013 21:23:45 +0100 Subject: Hack temporaire en attendant la recherche côté base-de-données MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Limite la recherche aux 20000 plus récents articles, en attendant https://github.com/marienfressinaud/FreshRSS/issues/204 --- app/models/Entry.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/models/Entry.php') diff --git a/app/models/Entry.php b/app/models/Entry.php index ed350cad8..2829a3586 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -412,9 +412,12 @@ class EntryDAO extends Model_pdo { . ' INNER JOIN ' . $this->prefix . 'feed f ON e.id_feed = f.id' . $where . ' ORDER BY e.date' . $order . ', e.id' . $order; - if (!empty($limitCount)) { - $sql .= ' LIMIT ' . ($limitCount + 2); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/ + if (empty($limitCount)) { + $limitCount = 20000; //TODO: FIXME: Hack temporaire en attendant la recherche côté base-de-données } + //if (!empty($limitCount)) { + $sql .= ' LIMIT ' . ($limitCount + 2); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/ + //} $stm = $this->bd->prepare ($sql); $stm->execute ($values); -- cgit v1.2.3