Is it possible to delete parts of a table without using rollback??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gert Schumann

    Is it possible to delete parts of a table without using rollback??

    I want to delete just parts of tables, so I can't use 'TRUNCATE'. As I
    want to delete about millions of lines, I need a very big rollback
    segment. The best way would be to delete without using rollback
    because the delete really takes a lot of time copying all data into
    the rollback file. Is this possible with oracle?
    Many thanks for any help!
    Gert
  • Jim Kennedy

    #2
    Re: Is it possible to delete parts of a table without using rollback??


    "Gert Schumann" <gertschumann@w eb.dewrote in message
    news:e652ddaa.0 503230543.221b6 d4b@posting.goo gle.com...
    I want to delete just parts of tables, so I can't use 'TRUNCATE'. As I
    want to delete about millions of lines, I need a very big rollback
    segment. The best way would be to delete without using rollback
    because the delete really takes a lot of time copying all data into
    the rollback file. Is this possible with oracle?
    Many thanks for any help!
    Gert
    No, that would cause potential data inconsistencies .
    Jim


    Comment

    • Mark.Powell@eds.com

      #3
      Re: Is it possible to delete parts of a table without using rollback??

      Gert, if the number of rows to be deleted exceeds the number of rows
      that are to remain after the deletion process you might want to
      consider renaming the existing table, then using a create tables as
      select against the original table to select out the remaining rows.
      Inserts take a lot less RBS space than deletes. Then you would need to
      drop and rebuild the indexes, FK to other tables, triggers, and reapply
      the grants from the original table to the new version.

      Another technique to speed large delete jobs when a maintenance window
      may not be available would be to use the parallel query option, PQO,
      against the table. This again would require lots of rollback but you
      should be able to cut the clock time.

      Finally if a lack of rollback space is the main issue then why not run
      the delete as a series of delete steps where each step limits itself to
      N number of rows? This may not be a slick as a single delete
      step/statment but this method can often eliminate a large quantity of
      data without taxing the capacity of the system too heavily.

      HTH -- Mark D Powell --

      Comment

      Working...