Improve update_feedbrowser_cache SQL query
This commit is contained in:
parent
ad7cea62e1
commit
453787526a
|
@ -23,9 +23,8 @@
|
||||||
function update_feedbrowser_cache() {
|
function update_feedbrowser_cache() {
|
||||||
|
|
||||||
$result = db_query("SELECT feed_url, site_url, title, COUNT(id) AS subscribers
|
$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
|
FROM ttrss_feeds WHERE feed_url NOT IN (SELECT feed_url FROM ttrss_feeds
|
||||||
WHERE tf.feed_url = ttrss_feeds.feed_url
|
WHERE private IS true OR auth_login != '' OR auth_pass != '' OR feed_url LIKE '%:%@%/%')
|
||||||
AND (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");
|
GROUP BY feed_url, site_url, title ORDER BY subscribers DESC LIMIT 1000");
|
||||||
|
|
||||||
db_query("BEGIN");
|
db_query("BEGIN");
|
||||||
|
|
Loading…
Reference in New Issue