When I run a select query which runs on a view in Postgres, it is starting 3 processes for a single query, which is causing high CPU utilization when multiple job runs in parallel.

How to avoid using parallel sequential scans and increase my query performance at the same time?


You can disable parallel query by setting max_parallel_workers_per_gather to 0 in postgresql.conf.

Then the only ways of speeding up processing are

  • keep the table cached in RAM

  • avoid a sequential scan by creating an index

If possible, the second way is much better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.