]> git.openstreetmap.org Git - nominatim.git/blob - utils/cron_vacuum.sh
cron job for vacuuming intarray indices
[nominatim.git] / utils / cron_vacuum.sh
1 #!/bin/bash
2 #
3 # Vaccum all tables with indices on integer arrays.
4 # Agressive vacuuming seems to help against index bloat.
5 #
6
7 psql -d nominatim -c 'VACUUM ANALYSE search_name' >/dev/null
8 psql -d nominatim -c 'VACUUM ANALYSE search_name_country' >/dev/null
9 psql -d nominatim -c 'VACUUM ANALYSE planet_osm_ways' >/dev/null
10
11 for i in `seq 0 246`; do
12   psql -d nominatim -c "VACUUM ANALYSE search_name_${i}" >/dev/null
13 done
14