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: Insert from another table...Create with ORDER BY

Re: Insert from another table...Create with ORDER BY

From: Narayanan Olagappan <narayan_at_sprynet.com>
Date: 1997/08/17
Message-ID: <33F74CC9.3E74@sprynet.com>#1/1

Jonathan Lewis wrote:
>
> Tomm Carr <tommcatt_at_geocities.com> wrote in article
> <33F481A3.2A68_at_geocities.com>...
> > eberry_at_dstcorp.com wrote:
> > Oracle is a *relational* dbms, and remember one of the
 characteristics
> > of a relational database is the ordering of the tuples is not
> > significant. Oracle does not allow the ORDER BY in the insert
 statement
> > because it is meaningless. If you will be accessing the data
 ordered by
> > -- apparently -- col1, then create an index on col1.
>
> 'tuples' are logical, rows are physical.
>
> It may be very sensible for performance reasons to arrange the rows
> in a specific physical order.

True, this kind of constructs will help in performance.

There is a work around if anyone interested:

Making use of other functions which have implicit sorting, like group by, union etc. For eg:

insert into <new tbl>
<query>
union
<query> Received on Sun Aug 17 1997 - 00:00:00 CDT

Original text of this message

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