RE: Learning more about and reading 10053 trace files

  • From: "Christian Antognini" <Christian.Antognini@xxxxxxxxxxxx>
  • To: <Brandon.Allen@xxxxxxxxxxx>
  • Date: Tue, 5 Sep 2006 20:56:00 +0200

Brandon

Just for completeness...

> Yes, the DISTINCT (sort & filter) happens at the end, but the
> difference is that a DISTINCT requires all rows to be fetched,
> sorted and filtered before it can return the first row - so it can't
> return the first row until it has processed all rows. 

Be careful, not in all situations all data need to be processed before
the first row is returned. Here an example...

SQL> select distinct ctr_code from addresses;

Execution Plan
----------------------------------------------------------
SELECT STATEMENT Optimizer=ALL_ROWS
  SORT (UNIQUE NOSORT)
    INDEX (FULL SCAN) OF 'ADR_CTR_CODE' (INDEX)



Cheers,
Chris
--
//www.freelists.org/webpage/oracle-l


Other related posts: