DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Please suggest a better way

  1. #11
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    There will be new rows getting created in the source table though.
    So NOLOGGING might not be a good idea.

    Since other activity is taking place at the same time, Tamil's solution has the advantage of keeping the database always in a consistant state - you'll never find a row in two places.
    Last edited by DaPi; 02-07-2006 at 06:20 PM.
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  2. #12
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    That would depend on whether the new activity includes inserting or updating rows so that they fall into the timestamp period to be archived -- if not then having the same row in two places at the same time seems to be a small price to pay -- it's pretty (IMHO) rare that a query would address both archived and non-archived rows such that a double-count might be an issue.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #13
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Tamil / Ken : How do I delete just the locked rows ? And, if I may know, why do you think the rownum based solution will not work ? Any technical reason for that ?
    __________________
    svk
    You can use "where current of" to delete locked rows.

    The reason for locking is no one can change/update/delete the rows that you want to insert into archived table.
    You can use rownum, however you must use "FOR UPDATE" along with "SELECT" statement.

    For performance reason NOLOGGING, APPEND, multiple threades etc can be used, but they will not solve basic logic.

    Tamil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width