From 82b3ad7a5242b09f6ad221e2d027ca1c060ff36e Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 15 Apr 2012 15:57:50 +0200 Subject: [PATCH] cron job for vacuuming intarray indices --- utils/cron_vacuum.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 utils/cron_vacuum.sh diff --git a/utils/cron_vacuum.sh b/utils/cron_vacuum.sh new file mode 100755 index 00000000..f33e8bb0 --- /dev/null +++ b/utils/cron_vacuum.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Vaccum all tables with indices on integer arrays. +# Agressive vacuuming seems to help against index bloat. +# + +psql -d nominatim -c 'VACUUM ANALYSE search_name' >/dev/null +psql -d nominatim -c 'VACUUM ANALYSE search_name_country' >/dev/null +psql -d nominatim -c 'VACUUM ANALYSE planet_osm_ways' >/dev/null + +for i in `seq 0 246`; do + psql -d nominatim -c "VACUUM ANALYSE search_name_${i}" >/dev/null +done + -- 2.39.5