Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7004179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:09:56+00:00 2026-05-27T21:09:56+00:00

I need to back up tables and their data as part of software testing.

  • 0

I need to back up tables and their data as part of software testing. The exact tables and the data they contain may vary so I can’t hard code the DDL or the data. The back up tables will have similar names as the original tables but with the prefix “QA_”. Similar, but not identical (except for the prefix), only because in order to work around the 31 character limit for table names I have to abbreviate some of the names.

Which would be the faster way of doing this? Using a cursor object and looping through the tables to get their DDL like this:

select dbms_metadata.get_ddl(''TABLE'',' || '''' || cursor_rec.object_name || '''' || ') from dual

Using that DDL to create the backup tables and then populating those tables with:

INSERT /*+ parallel(' || new_table_name || 'DEFAULT) */ INTO '  || new_table_name  || ' SELECT  * FROM '  || table_name  || ''

Or doing a simple:

CREATE TABLE' || new_table_name 'PARALLEL AS SELECT * from ' || table_name || ''

Which is the faster of the two methods?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:09:57+00:00Added an answer on May 27, 2026 at 9:09 pm

    Well, both INSERT /*+ PARALLEL */ and CREATE TABLE .... PARALLEL AS SELECT ... are going to do direct load insert. So, they are largely going to use the same code path, for the data loading.

    CTAS will need to first do the DDL to create the table, before proceeding with the load. But, that’s a small amount of fixed work. The larger the table being copied, the smaller factor that will be.

    Finally, I’ll just mention, that you should look into NOLOGGING to further improve performance.

    On the CTAS, you can just add the NOLOGGING keyword after the PARALLEL keyword. For the INSERT /*+ PARALLEL */, you’ll need to first do an ALTER TABLE ... NOLOGGING to enable it.

    Note that there are a few things you need to know, if you decide to go with NOLOGGING. First, only direct-load will do nologging. For tables, that means CTAS and INSERT with PARALLEL or APPEND hint.

    Secondly, consider the recovery implications of NOLOGGING. When a table is loaded with NOLOGGING option, the data is NOT logged to REDO. So, you won’t be able to recover the data in the table, unless you use a backup taken after the data was sucessfully loaded and committed.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to back my database, but when trying to flush the tables before
How can I remove the 'unbind' after using it? I need to enable back
I have two tables: Client(id,name,...) Purchase(id,item,date,client_id,...) They have their respective Model, with their validations.
I have a one table question_table and one ImageButton ( Back ). I need
I need to back up the configuration of a HP ProCurve and I need
I need someone to back me up, or prove me wrong, in regard to
I have 2 div's that I need consecutively toggled back and forth showing and
OSX 10.7, XCode 4. I have a small problem: I need to push back
I need to make a reverse proxy back to a tomcat server running a
I need to refresh my Activity once i click my Tab activity back. Currently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.