"Sort Aggregate" and sorts in Statistics.

  • From: "Dhimant Patel" <drp4kri@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 17 Sep 2008 16:48:59 -0400

Hi All,

Although current issue does not involve query result cache - I was testing
result_Cache hint on Oracle 11g Enterprise edition while experienced this.
I always thought "SORT AGGREGATE" operation must involve sorts either disk
or memory, is that correct? Following explain plan does not show
it being the case.

Could someone please explain?


SQL> select min(SAL), max(sal) from emp;

  MIN(SAL)   MAX(SAL)
---------- ----------
       800       5000


Execution Plan
----------------------------------------------------------
Plan hash value: 2083865914

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |     1 |     4 |     3   (0)| 00:00:01 |
*|   1 |  SORT AGGREGATE    |*      |     1 |     4 |            |
|
|   2 |   TABLE ACCESS FULL| EMP  |    14 |    56 |     3   (0)| 00:00:01 |
---------------------------------------------------------------------------


Statistics
----------------------------------------------------------
          1  recursive calls
          0  db block gets
          7  consistent gets
          0  physical reads
          0  redo size
        591  bytes sent via SQL*Net to client
        523  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
*          0  sorts (memory)
          0  sorts (disk)*
          1  rows processed



-DP.

Other related posts:

  • » "Sort Aggregate" and sorts in Statistics.