awips2/deltaScripts/19.1.1/DR6966/addStdTextProductIndexes.sh
2022-05-05 12:34:50 -05:00

16 lines
No EOL
683 B
Bash
Executable file

#! /bin/bash
# Adds indexes to stdTextProducts and practiceStdTextProducts to
# improve purge performance
/awips2/psql/bin/psql -U awipsadmin -d fxatext -c "
DROP INDEX IF EXISTS public.textafosidreftime_idx;
CREATE INDEX textafosidreftime_idx
ON public.stdtextproducts
USING btree
(cccid COLLATE pg_catalog."default", nnnid COLLATE pg_catalog."default", xxxid COLLATE pg_catalog."default", reftime);
DROP INDEX IF EXISTS public.practicetextafosidreftime_idx;
CREATE INDEX practicetextafosidreftime_idx
ON public.practicestdtextproducts
USING btree
(cccid COLLATE pg_catalog."default", nnnid COLLATE pg_catalog."default", xxxid COLLATE pg_catalog."default", reftime);
"