Add db.warmup.

This commit is contained in:
Gea-Suan Lin
2016-09-11 03:34:37 +08:00
parent 2798807fa0
commit 5c476c7950
2 changed files with 8 additions and 0 deletions

View File

@@ -29,6 +29,10 @@ alias smic="sudo env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
alias ssh="ssh -C -e none -v"
alias t="telnet"
#
function db.warmup() {
pt-find --charset=utf8 --print -h $1 | xargs -t -P8 -I% -n1 sh -c "echo 'SELECT COUNT(*) FROM %;' | mysql -h $1 > /dev/null"
}
#
export BLOCKSIZE="k"
export EDITOR="vim"
export GIT_PAGER="less"