]> git.wh0rd.org Git - tt-rss.git/commitdiff
Revert "Performance breakthrough"
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 15 Jul 2015 05:32:57 +0000 (08:32 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 15 Jul 2015 05:32:57 +0000 (08:32 +0300)
This reverts commit c2916856541ed82b2f11b5f3ff29b1e4f5cd6b3e.

include/functions.php

index a57c0947809adff86ed265eccdf106074605fe3b..22179e1a4c74f59598fba6b753bef8573cc2ad7d 100644 (file)
 
                // 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.");