mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-09 22:37:57 +00:00
add database optimization settings
This commit is contained in:
parent
fc687f7f2c
commit
45c4f7b7b0
@ -384,6 +384,13 @@ define('CLEAN_PAGE_BAN_SECONDS_OFFSET', 60*60*24*30);
|
||||
*/
|
||||
define('CLEAN_PAGE_DESCRIPTION_OFFSET', 60*60*24*30*12*10);
|
||||
|
||||
/*
|
||||
* Run database tables optimization
|
||||
*
|
||||
* When enabled - may reduce disk space usage but requires enough of RAM
|
||||
*
|
||||
*/
|
||||
define('CLEAN_DB_TABLES_OPTIMIZATION', true);
|
||||
|
||||
// API settings
|
||||
|
||||
|
@ -253,7 +253,10 @@ try {
|
||||
$db->commit();
|
||||
|
||||
// Optimize tables
|
||||
$db->optimize();
|
||||
if (CLEAN_DB_TABLES_OPTIMIZATION) {
|
||||
|
||||
$db->optimize();
|
||||
}
|
||||
|
||||
} catch(Exception $e) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user