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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help on Sorting

Re: Help on Sorting

From: Lothar Armbruester <lothar.armbruester_at_rheingau.netsurf.de>
Date: 1998/01/26
Message-ID: <869.330T1938T12964157@rheingau.netsurf.de>#1/1

On 25-Jan-98 00:07:16 Noodles wrote:

>In the relational model, the records can be in any order in the database.
>Even if you output the table data, sort it and reload into another table;
>there's still no guarantee that the records will maintain their sorted order.
 

>Why not just use the SQL operator "order by <column>" when you access the
>database ?

To speed up sorts on numeric field, one can create an index on such fields. When the column has a not null constraint, the index is used when the order by is requested.
This does not work on char and varchar2 columns because Oracle considers the NLS settings when ordering by and indexes are sorted without these settings.

>Cliff

Hope that helps,
Lothar

--
Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Schulstr. 12            | lothar.armbruester_at_t-online.de
D-65375 Oestrich-Winkel |
Received on Mon Jan 26 1998 - 00:00:00 CST

Original text of this message

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