1
0
Эх сурвалжийг харах

Update InstanceUpdateTotalLocalPosts.php

- Improve total post count by adding `uri` IS NULL check
Daniel Supernault 3 сар өмнө
parent
commit
f4a365e2b2

+ 1 - 1
app/Console/Commands/InstanceUpdateTotalLocalPosts.php

@@ -78,7 +78,7 @@ class InstanceUpdateTotalLocalPosts extends Command
     protected function getTotalLocalPosts()
     protected function getTotalLocalPosts()
     {
     {
         if ((bool) config('instance.total_count_estimate') && config('database.default') === 'mysql') {
         if ((bool) config('instance.total_count_estimate') && config('database.default') === 'mysql') {
-            return DB::select("EXPLAIN SELECT COUNT(*) FROM statuses WHERE deleted_at IS NULL AND local = 1 AND type != 'share'")[0]->rows;
+            return DB::select("EXPLAIN SELECT COUNT(*) FROM statuses WHERE deleted_at IS NULL AND uri IS NULL and local = 1 AND type != 'share'")[0]->rows;
         }
         }
 
 
         return DB::table('statuses')
         return DB::table('statuses')