Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Will the function in the GROUP BY clause be calculated?

Will the function in the GROUP BY clause be calculated?

From: qihua wu <wqhhp_at_yahoo.com>
Date: Sun, 4 Jun 2006 19:33:55 -0700 (PDT)
Message-ID: <20060605023355.59634.qmail@web55601.mail.re4.yahoo.com>


Please help me with this statement:
  select complex_fun(col_a) from table group by complex_fun(col_a) having count(*)>2    

  For every row in the table, complex_fun(col_a) will be calculated when oracle scans the table, so will it calculate the function again when oracle encounters the GROUP BY clause? Or it just use the result of calculations in the SELECT clause?    

  Support there are 1 million rows in the table, and the result set has 0.2 million. So will oracle calculate the function 1 million times or 1+0.2=1.2 million times?    

  Thanks
  Qihua                             



Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better.
--

http://www.freelists.org/webpage/oracle-l Received on Sun Jun 04 2006 - 21:33:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US