Commit f7a246de authored by 赵威's avatar 赵威

update script

parent 33ef7e39
#!/bin/bash
# 新画像
# log
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from kafka_tag3_log where log_time < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 60 day))"
# portrait1
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day) and substr(md5(cl_id), -1, 1) IN ('0', '1', '2')"
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day) and substr(md5(cl_id), -1, 1) IN ('3', '4', '5')"
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day) and substr(md5(cl_id), -1, 1) IN ('6', '7', '8')"
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day) and substr(md5(cl_id), -1, 1) IN ('a', 'b', 'c')"
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day)"
# portrait2
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_event_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day) and substr(md5(cl_id), -1, 1) IN ('0', '1', '2')"
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_event_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day) and substr(md5(cl_id), -1, 1) IN ('3', '4', '5')"
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_event_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day) and substr(md5(cl_id), -1, 1) IN ('6', '7', '8')"
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_event_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day) and substr(md5(cl_id), -1, 1) IN ('a', 'b', 'c')"
mysql -u st_user -paqpuBLYzEV7tML5RPsN1pntUzFy -h 172.16.40.158 -P 4000 -D jerry_test -e "delete from user_tag3_event_portrait where date < DATE_SUB(CURDATE(), INTERVAL 15 day)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment