From f76f773a16c70f745626e27b9981e6d815681da5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 5 Dec 2017 22:37:50 +0300 Subject: [PATCH] purge_orphans: limit maximum number of deleted articles --- classes/article.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/article.php b/classes/article.php index f1271284..7430fac3 100644 --- a/classes/article.php +++ b/classes/article.php @@ -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(); -- 2.39.5