This example restricts all queries started in the current session to 5 worker processes:
set parallel_degree 5
While this command is in effect, any query on a table with more than 5 partitions cannot use a partition-based scan.
To remove the session limit, use:
set parallel_degree 0
or:
set scan_parallel_degree 0
To run subsequent queries in serial mode, use:
set parallel_degree 1
or:
set scan_parallel_degree 1
To set resource granularity to 25% of the total resources available in the system, use:
set resource_granularity 25
The same is true for repartition degree as well; you can set it to a value of 5. It cannot, however, exceed the value of max parallel degree.
set repartition_degree 5