From: Vincent Zanotti Date: Wed, 2 Jul 2008 19:53:00 +0000 (+0200) Subject: Prunes older entries in table search_autocomplete (will speed up the autocompletion... X-Git-Tag: xorg/0.9.17~65 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=66f03717cd2f6a96cf1b8e02ea53f09594b0c29b;p=platal.git Prunes older entries in table search_autocomplete (will speed up the autocompletion cache). Signed-off-by: Vincent Zanotti --- diff --git a/bin/cron/clean.php b/bin/cron/clean.php index 3c0590d..9744d97 100755 --- a/bin/cron/clean.php +++ b/bin/cron/clean.php @@ -43,6 +43,8 @@ query("ALTER TABLE groupesx_def ORDER BY text"); query("ALTER TABLE secteur ORDER BY text"); query("ALTER TABLE sections ORDER BY text"); +// Prunes older autocomplete queries. +query("DELETE FROM search_autocomplete WHERE generated < DATE_SUB(NOW(), INTERVAL 1 DAY)"); // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>