Ask the Expert

Deleting rows without space for undo generation data

This question was asked in an interview: If I want to delete the first 600 rows from one table and there is no disk space for undo generation data, what should I do? What is the way to sort out this problem?

    Requires Free Membership to View

If I were asked this question, I'd bring up three points.

First, deleting 600 rows of data from a table will not generate that much undo, so if you are that tight on disk, you would have many problems other than just deleting data from a table. It is time to procure more disk.

Second, the only method that will remove rows from a table and not generate undo is to use the TRUNCATE TABLE command. But that will remove all rows from the table. You cannot delete the first 600 rows from a table and not generate any undo.

Third, there is no such thing as "the first xxx rows" of data in a table. By definition, rows in a table are unordered. So there is no first or last row of data. This is fundamental to the basics of relational database theory.

This was first published in July 2006

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: