or Create Script: nano reindex.sh insert psql "postgresql://$USER:[email protected]/sth_smartholdem" -c 'REINDEX DATABASE sth_smartholdem' psql "postgresql://$USER:[email protected]/sth_smartholdem" -c 'vacuum full analyze' run sh reindex.sh