From: Luc Didry Date: Thu, 16 Feb 2017 11:05:32 +0000 (+0100) Subject: Improve update_feedbrowser_cache SQL query X-Git-Tag: 17.4~23^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=453787526ad7a115f0f321f6a4a810c6ebe5e089;p=tt-rss.git Improve update_feedbrowser_cache SQL query --- diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 1f38091b..e26fc38b 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -23,9 +23,8 @@ function update_feedbrowser_cache() { $result = db_query("SELECT feed_url, site_url, title, COUNT(id) AS subscribers - FROM ttrss_feeds WHERE (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf - WHERE tf.feed_url = ttrss_feeds.feed_url - AND (private IS true OR auth_login != '' OR auth_pass != '' OR feed_url LIKE '%:%@%/%')) + FROM ttrss_feeds WHERE feed_url NOT IN (SELECT feed_url FROM ttrss_feeds + WHERE private IS true OR auth_login != '' OR auth_pass != '' OR feed_url LIKE '%:%@%/%') GROUP BY feed_url, site_url, title ORDER BY subscribers DESC LIMIT 1000"); db_query("BEGIN");