Undo segments and performance

Undo segments and performance

I have a job that truncates a huge table and inserts data into it. This job runs once a day. Searching for ways to optimize the insert, I found an 'append hint' that seems to bring me better results. I read that this hint does not create undo logs, and that's my question. I read all the time about redo logs but never heard of undo logs. What are they? I am running Oracle 8i and the subject table has nologging set.

    Requires Free Membership to View

    By submitting your registration information to SearchOracle.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchOracle.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Undo segments (not logs) were called "rollback segments" prior to Oracle9i. Oracle writes the previous contents of database blocks to them when performing DML; this is what allow you to roll back DML statements. Since writes to undo segments are database writes (these segments are stored in a tablespace on disk like all other user data), changes to them are normally logged as redo. In the case of insert-append with a nologging hint, neither the user data changes nor the undo segment changes are logged in the redo stream.

This was first published in June 2005

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.