Hi Ranganath,

If the column on which u perform ORDER BY has a index then
try using INDEX_ASC or INDEX_DESC optimizer hint  in
your SELECT statement to avoid SORT.

hope this may help u.

Arul.


Ranganath K wrote:

> Dear DBA Gurus,
>
>         I have some static data in two of my tables which contains lakhs of
> records.  Is there any way I can sort the data in the two tables and put the
> sorted data in the same table or some temporary table without creating a new
> one. Why I want this is because when I write a search query based on two
> tables with the order by clause it is taking a long time to execute the
> query but without the order by clause it is executing fast.  I tried to
> create a view based on the tables with the order by clause and then try to
> run my search based query on the view.  Then also the execution time is
> more.  Is there any way I can create a clustered index like we do in SQL
> server in Oracle which sorts the data and stores in the table?  Any
> workaround?  Any help in this regard will be greatly appreciated.
>
> TIA and Warm Regards,
>
> Ranganath
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Ranganath K
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Arul kumar
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to