xargs foo helps a lot for running parallel operation..
This is the example , how we can rebuild indexes parallel on postgres
cat create_index.sql | xargs -d “n” -L1 -P10 -I _CREATE_ psql -qAt -U postgres -p 5432 -d pagila -c “_CREATE_”
xargs foo helps a lot for running parallel operation..
This is the example , how we can rebuild indexes parallel on postgres
cat create_index.sql | xargs -d “n” -L1 -P10 -I _CREATE_ psql -qAt -U postgres -p 5432 -d pagila -c “_CREATE_”