Prunes older entries in table search_autocomplete (will speed up the autocompletion...
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Wed, 2 Jul 2008 19:53:00 +0000 (21:53 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Wed, 2 Jul 2008 19:53:00 +0000 (21:53 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
bin/cron/clean.php

index 3c0590d..9744d97 100755 (executable)
@@ -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:
 ?>