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: Order rows

RE: Order rows

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Wed, 15 May 2002 08:39:07 -0800
Message-ID: <F001.004613B3.20020515083907@fatcity.com>


K Gopalakrishnan,

No matter how I look at this, it is still bad advice. Depending on Oracle internals to return rows in the manner in which they are inserted, when Oracle states in all of it's training classes that this is not possible, is bad advice.

You might be correct in what you say - but it is still a "trick" depending on how Oracle internals works. In a year, this may change, and it may not work any more, in which case, the application no longer works correctly.

It may be an option, but a poor one at best.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Wednesday, May 15, 2002 12:25 PM
To: Multiple recipients of list ORACLE-L

Tom:

I am just giving an option NOT that I recommend everyone to use that.

Then coming to your question:

> This is bad advice. What happens after some records are deleted and new
> ones inserted. The new records will be placed within the spaces made
empty
> by the deleted records.

Set the PCTUSED to absolutely low value so that the used blocks never linked to freelist chain. So everytime you look for a space you go for a virgin
block. THe space reclaimed by any DELETEs never returns to freelists .

Best Regards,
K Gopalakrishnan
Bangalore, INDIA

> K Gopalakrishnan,
>
> This is bad advice. What happens after some records are deleted and new
> ones inserted. The new records will be placed within the spaces made
empty
> by the deleted records.
>
> I would never guarantee retrieving data in the order it was inserted
unless
> the table contained a sequence number. There is no other way to guarantee
> this.
>
> Tom Mercadante
> Oracle Certified Professional
>
>
> -----Original Message-----
> Sent: Wednesday, May 15, 2002 10:28 AM
> To: Multiple recipients of list ORACLE-L
>
>
> Rachel:
>
>
> If you want to FORCE the order you can do couple of things like having a
big
> PCTFREE (to make sure that no rows are migrated because of the updates)
and
> small PCTUSED so that the blocks are never reused. In this case you will
get
> the
> rows in the inserted order.
>
> ANother alternative is your method (additional column SYSDATE)
>
> Best Regards,
> K Gopalakrishnan
> Bangalore, INDIA
>
>
>
>
> ----- Original Message -----
> To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
> Sent: Wednesday, May 15, 2002 7:33 PM
>
>
> >
> >
> > Do you want to physically order them or do you just want to know by time
> the
> > order in which they were entered.
> >
> > if the first, no, not that I know of. If the later, yes, add another
> column
> > (ins_date date) and a trigger to populate that column with sysdate when
> you
> > insert a row. You can then order by ins_date
> >
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: K Gopalakrishnan
> INET: kaygopal_at_yahoo.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: Mercadante, Thomas F
> INET: NDATFM_at_labor.state.ny.us
>
> 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: K Gopalakrishnan
  INET: kaygopal_at_yahoo.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: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us

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 15 2002 - 11:39:07 CDT

Original text of this message

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