Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MINUS and DELETE

user60022Dec 10 2010 — edited Dec 14 2010
Hi all,

Can someone tell me how oracle does minus operation? Is it a DML operation?

In data warehouse system, we are usually confronted with this kind of situations. To delete a great number rows from a much bigger data set.

For example, 10million rows should be removed from 10 Billion.

Let assume we can know or enumerate the rows that we should remove. I mean I can create the table
create table rows_to_delete nologging
as select /*+ parallel */ * from t where <filter condtions>;

Which is faster or more reasonable or more feasible of the following two method:

1. create table rows_to_keep nologging
as
(select * from t minus select * from rows_to_delete)

2. delete DML directly.

Or you may give a better solution?

Thank you very much.
Leon

Edited by: user12064076 on Dec 10, 2010 12:07 AM

Edited by: user12064076 on Dec 10, 2010 12:08 AM
This post has been answered by William Robertson on Dec 14 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2011
Added on Dec 10 2010
13 comments
2,315 views