purge_orphans: optimize the query, maybe
https://tt-rss.org/forum/viewtopic.php?f=1&t=3417&p=20408#p20407
This commit is contained in:
parent
9264ec7055
commit
7680d44ef2
|
@ -320,7 +320,7 @@
|
||||||
|
|
||||||
// purge orphaned posts in main content table
|
// purge orphaned posts in main content table
|
||||||
$result = db_query("DELETE FROM ttrss_entries WHERE
|
$result = db_query("DELETE FROM ttrss_entries WHERE
|
||||||
(SELECT COUNT(int_id) FROM ttrss_user_entries WHERE ref_id = id) = 0");
|
NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id)");
|
||||||
|
|
||||||
if ($do_output) {
|
if ($do_output) {
|
||||||
$rows = db_affected_rows($result);
|
$rows = db_affected_rows($result);
|
||||||
|
|
Loading…
Reference in New Issue