Created
May 11, 2009 04:27
-
-
Save Yasushi/109864 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB=$1 | |
if [ "x$DB" == "x" -o ! -f "$DB" ]; then | |
exit | |
fi | |
echo $DB | |
sqlite3 $DB 'vacuum' | |
for i in `sqlite3 $DB .schema | grep -o 'INDEX [^ ]*' | sed -e 's/^INDEX \([^ ]*\)/\1/'` | |
do | |
echo $i | |
sqlite3 $DB "reindex $i" | |
done | |
echo ...$DB done. | |
# sqlite3 cookies.sqlite 'create index moz_cookies_hostindex on moz_cookies ( host)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment