How can I reduce the TEMP usage and increase PGA usage
We have a large (26Tb) ) DW Oracle 12.2 database running on Linux (PGA is sized to 70GB) . Multiple users run SQL report joining to eight large sub-partitioned tables using four parallel threads . The SQL report runs slow and returns more than 4 million row and has 205 columns in GROUP BY clause. Last night in a four hour window the we used 3.6Tb of TEMP space.
What I have seen is that when multiple reports runs, some fail on TEMP space. Individual report SQL uses 20Gb of TEMP space. The memory is needed for hash group/join operation.
Is it possible to increase request percentage to the PGA. Lets say instead of requesting X% from PGA, can I increase it to Y%? I would like to prevent going to TEMP space. I think hash-join's constant reading from the TEMP space in chunks delays the query.