]> git.mxchange.org Git - friendica.git/blobdiff - src/Database/DBA.php
Apply suggestions from code review
[friendica.git] / src / Database / DBA.php
index d609f108ebf0626506b28d251b99dabfb2de7706..930e60472f948ebd12d2ac1ed0f8e72c93dc3f47 100644 (file)
@@ -821,6 +821,27 @@ class DBA
                return DI::dba()->processlist();
        }
 
+       /**
+        * Optimizes tables
+        *
+        * @param string $table a given table
+        *
+        * @return bool True, if successfully optimized, otherwise false
+        * @throws \Exception
+        */
+       public static function optimizeTable(string $table): bool
+       {
+               return DI::dba()->optimizeTable($table);
+       }
+
+       /**
+        * Kill sleeping database processes
+        */
+       public static function deleteSleepingProcesses()
+       {
+               DI::dba()->deleteSleepingProcesses();
+       }
+
        /**
         * Fetch a database variable
         *