Re: internal order of oracle tables

From: Bruce Pihlamae <pihlab_at_cbr.hhcs.gov.au>
Date: 4 Jul 94 10:29:40 +1000
Message-ID: <1994Jul4.102940.1_at_cbr.hhcs.gov.au>


In article <Cs625A.84H_at_gremlin.nrtc.northrop.com>, mdreis_at_world.nad.northrop.com (Martin Dreis) writes:
> is there anyway to have oracle keep a table in order by
> primary keys? just wondering if we can get away from having
> to use order by on some of our selects.

There is no mechanism for doing this directly.

If you have a primary or secondary key that extracts the data in the order that you want then you could probably leave off the ORDER BY clause.

If you create a CLUSTER (consisting of a single table) with the cluster index being the order in which you want the table maintained then I think it guarantees that all rows with the same index value are grouped together but I'm not sure what order it would retrieve them in.

-- 

Bruce...        pihlab_at_cbr.hhcs.gov.au

*******************************************************************
* Bruce Pihlamae  --  Database Administration                     *
* Commonwealth Department of Human Services and Health            *
* Canberra, ACT, Australia                        (W) 06-289-7056 *
*=================================================================*
* These are my own thoughts and opinions, few that I have.        *
*******************************************************************

"The more complex the argument gets, the easier it is to refute."
"Killing is wrong!"  -- Trent 'The Uncatchable' Castanaveras
Received on Mon Jul 04 1994 - 02:29:40 CEST

Original text of this message