diff options
author | friendica <info@friendica.com> | 2012-05-08 15:33:01 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-05-08 15:33:01 -0700 |
commit | 10812e0c19b9a8db3620c40656ba8bb480e04da0 (patch) | |
tree | 77357de8d361da105720e2c16545d01054224563 /include/expire.php | |
parent | da4a360a6ebef8188aa9125b6911b88d7eb9e609 (diff) | |
download | volse-hubzilla-10812e0c19b9a8db3620c40656ba8bb480e04da0.tar.gz volse-hubzilla-10812e0c19b9a8db3620c40656ba8bb480e04da0.tar.bz2 volse-hubzilla-10812e0c19b9a8db3620c40656ba8bb480e04da0.zip |
make it optional to optimize the item table after expire
Diffstat (limited to 'include/expire.php')
-rw-r--r-- | include/expire.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/expire.php b/include/expire.php index 5fa0ec758..755cd2494 100644 --- a/include/expire.php +++ b/include/expire.php @@ -32,7 +32,11 @@ function expire_run($argv, $argc){ // physically remove anything that has been deleted for more than two months $r = q("delete from item where deleted = 1 and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY"); - q("optimize table item"); + + // make this optional as it could have a performance impact on large sites + + if(intval(get_config('system','optimize_items'))) + q("optimize table item"); logger('expire: start'); |