]> git.wh0rd.org Git - tt-rss.git/commitdiff
purge_orphans: limit maximum number of deleted articles
authorAndrew Dolgov <noreply@fakecake.org>
Tue, 5 Dec 2017 19:37:50 +0000 (22:37 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Tue, 5 Dec 2017 19:37:50 +0000 (22:37 +0300)
classes/article.php

index f1271284e84f6a2a23b58f25c627dbe656bcf8b6..7430fac33cf287a01cd707de1262953749b05d79 100644 (file)
@@ -905,7 +905,7 @@ class Article extends Handler_Protected {
 
                $pdo = Db::pdo();
                $res = $pdo->query("DELETE FROM ttrss_entries WHERE
-                       NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id)");
+                       NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) LIMIT 5000");
 
                if ($do_output) {
                        $rows = $res->rowCount();