mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-08 22:07:56 +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);
|
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
|
// API settings
|
||||||
|
|
||||||
|
@ -253,7 +253,10 @@ try {
|
|||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
// Optimize tables
|
// Optimize tables
|
||||||
|
if (CLEAN_DB_TABLES_OPTIMIZATION) {
|
||||||
|
|
||||||
$db->optimize();
|
$db->optimize();
|
||||||
|
}
|
||||||
|
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user