By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,640 Members | 1,600 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,640 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Gert Schumann" <ge**********@web.de> wrote in message
news:e6**************************@posting.google.c om...
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
Jul 19 '05 #2

P: n/a
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 --

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.