有的时候我们在使用ES时,由于资源有限或业务需求,我们只想保存最近一段时间的数据,所以有如下脚本可以定时删除数据 delete_es_by_day.sh #!/bin/sh # example: index_name=$ daycolumn=$ savedays=$ format_day=$ if [ ! -n "$savedays" ]; then echo "the args is not right,please input again...." exit f
mysql定时删除当前时间前分钟的数据 2013-01-31 0个评论 作者:上官车月 收藏 我要投稿 mysql定时删除当前时间前分钟的数据 Sql代码 www.2cto.com SET GLOBAL event_scheduler = ON; delimiter $$ drop event if exists e_wom_stat; create event e_wom_stat on schedule EVERY 1 day