purge_orphans: limit maximum number of deleted articles

This commit is contained in:
Andrew Dolgov 2017-12-05 22:37:50 +03:00
parent 99b23daee6
commit f76f773a16

View 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();