diff options
author | Andrew Dolgov <[email protected]> | 2015-07-15 08:32:57 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-07-15 08:32:57 +0300 |
commit | a950fbecb5c71fbed6adcf76fc1d4787f05ecb7f (patch) | |
tree | ab1c1134d1d9ec8100fe6ae2036352737b6d0c81 | |
parent | 8aaf7f4b7b5f808b908465711d92e155ff96d789 (diff) |
Revert "Performance breakthrough"
This reverts commit c2916856541ed82b2f11b5f3ff29b1e4f5cd6b3e.
-rw-r--r-- | include/functions.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php index a57c09478..22179e1a4 100644 --- a/include/functions.php +++ b/include/functions.php @@ -320,7 +320,8 @@ // purge orphaned posts in main content table $result = db_query("DELETE FROM ttrss_entries WHERE - id NOT IN (SELECT ref_id FROM ttrss_user_entries WHERE ref_id IS NOT NULL)"); + (SELECT COUNT(int_id) FROM ttrss_user_entries WHERE ref_id = id) = 0"); + if ($do_output) { $rows = db_affected_rows($result); _debug("Purged $rows orphaned posts."); |