title: Group by is taking very long time in SQL Query in Oracle
body: <p>When I use  <code>group</code> in my query to get the Sum of few columns, it starts taking too much of time .</p>
  
  <p>Example : - </p>
  
  <pre><code>SELECT  
      A.ID PROJECT_ID,
      REGION.LEVEL2_NAME REGION,
      A.LOCATION LOCATION,
      A.DEPT DEPT,
      REPLACE(A.ROLE_NAME, ',', '') ROLE_NAME,
      A.MONTH_START,
      TO_CHAR(A.MONTH_START,'MON YYYY') MONTH_LABEL,
      Sum(A.value1),Sum(A.value2)
  FROM 
  (/here is my Select Query which gives flat data with some 2 UNION Queries/ )A
   INNER JOIN table REGION ON A.column1= REGION.column1
  GROUP BY  
      A.ID, 
      A.ROLE_NAME, 
      A.LOCATION, 
      A.DEPT, 
      A.UNIT_OF_MEASURE,
      REGION.LEVEL2_NAME, 
      A.MONTH_START 
  </code></pre>
  
  <p>Please advice .</p>