Practice of transferring Oracle to massive data

Source: Internet
Author: User

Assume that you want to transfer a large amount of data (more than 80 Mb) from Oracle to another user or table space. You can use the following method to quickly transfer data. The following describes the related content.

I. How to create a new table

 
 
  1. create table target_tablename tablespace   
  2. target_tablespace_name nologging   
  3. pctfree 10 pctused 60   
  4. storage(initial 5M next 5M minextents 1   
  5. maxextents unlimited pctincrease 0)  
  6. as select * from username.source_tablename where  

Condition;

Note: The newly created table does not have the index and default value of the original table. Only non-null constraints can be inherited. Other constraints or indexes need to be re-created.

2. Direct insertion

 
 
  1. INSERT /*+ APPEND */ INTO target_tablename   
  2. SELECT * FROM username.source_tablename where 

Condition;

COMMIT;

Note:

Using the INSERT/* + APPEND */method generates an exclusive lock of 6 for target_tablename. If you run this command, DML operations on target_tablename will be queued after it, it is not suitable for the table operations used by the OLTP system.

Note: These two methods do not use the data buffer zone in the SGA and the rollback segment of transaction processing when Oracle transfers data, nor do it write online transaction logs, writing data directly to physical files, just like the Database loading tool Solload, is fast. All Versions later than Oracle8i can be used.

Article from http://database.csdn.net/page/67885150-ebd0-489f-8eb7-c6e3c47907a5

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.