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

Home -> Community -> Mailing Lists -> Oracle-L -> Re:How to avoid sorting in the select statement?

Re:How to avoid sorting in the select statement?

From: <dgoulet_at_vicr.com>
Date: Wed, 16 May 2001 06:54:33 -0700
Message-ID: <F001.00304CFB.20010516063638@fatcity.com>

Ranganath,

    You will notice a delay with the order by clause since Oracle has to extract the data from the tables into a un-indexed temp table, and then sort the data. Can you cluster it, Sure. Will it help performance, depends on whether or not all of the items in the items in the order by clause are also included in the cluster key. Check out the create cluster command in the SQL reference manual.

Dick Goulet

____________________Reply Separator____________________
Author: "Ranganath K" <ranganathk_at_subexgroup.com>
Date:       5/15/2001 10:35 PM

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:
  INET: dgoulet_at_vicr.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 - 08:54:33 CDT

Original text of this message

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