diff options
author | Andrew Dolgov <[email protected]> | 2020-12-04 08:44:43 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-12-04 08:44:43 +0300 |
commit | 904d5f7a3b708f20ed3516d3ddff1aa605c0da68 (patch) | |
tree | cfb720d7ddacf459b881b3ced55cd8e03787be80 | |
parent | e9673eb13d0cd549868db5b77adf81eb03aa5b8a (diff) |
queryFeedHeadlines: no longer select DISTINCT headlines for performance reasons (this also removes _HEADLINES_QUERY_NO_DISTINCT)
-rwxr-xr-x | classes/feeds.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index 93dc2d2d8..281385936 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -1412,9 +1412,6 @@ class Feeds extends Handler_Protected { $pdo = Db::pdo(); - // experimental: define _HEADLINES_QUERY_NO_DISTINCT to disable DISTINCT keyword on headline queries - $HEADLINES_QUERY_DISTINCT = defined('_HEADLINES_QUERY_NO_DISTINCT') ? "" : "DISTINCT"; - // WARNING: due to highly dynamic nature of this query its going to quote parameters // right before adding them to SQL part @@ -1732,7 +1729,7 @@ class Feeds extends Handler_Protected { if (!$search && !$skip_first_id_check) { // if previous topmost article id changed that means our current pagination is no longer valid - $query = "SELECT $HEADLINES_QUERY_DISTINCT + $query = "SELECT ttrss_feeds.title, date_entered, $yyiw_qpart, @@ -1772,9 +1769,9 @@ class Feeds extends Handler_Protected { } } - $query = "SELECT $HEADLINES_QUERY_DISTINCT + $query = "SELECT date_entered, - $yyiw_qpart, + $yyiw_qpart, guid, ttrss_entries.id,ttrss_entries.title, updated, @@ -1813,7 +1810,7 @@ class Feeds extends Handler_Protected { } else { // browsing by tag - $query = "SELECT $HEADLINES_QUERY_DISTINCT + $query = "SELECT date_entered, guid, note, |