Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to avoid sorting in the select statement?
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: ranganathk_at_subexgroup.com
>
> 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: ListGuru_at_fatcity.com (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: rakumar_at_mahindrabt.com 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: ListGuru_at_fatcity.com (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).Received on Wed May 16 2001 - 07:20:35 CDT
![]() |
![]() |