Comparison of insert, copy, and insert append operations in oracle

Source: Internet
Author: User


Comparison of insert, copy and insert append operations in oracle is still due to database migration. The execution speed of insert, copy and insert append is tested. Environment: migrate oracle9i to oracle11g, linux system. The table has been created and only data can be inserted. You cannot use create... select or copy... create. 1. Create a dblink for insert and insert append. 2. log on to the 11g database. Set timing on3. create a view to view redo size create redo_size asselect value www.2cto.com from v $ mystat, v $ statname where v $ mystat. statistic # = v $ statname. statistic # and v $ statname. name = 'redo size'; 4. insert into dblink_test_tab select * from tran_rec_03 @ dblink_test; insert/* + APPEND */into dblink_test_tab select * from tran_rec_03 @ dblink_test; copy from ispay/ispay @ crmtest insert dblink_test_tab using select * from tran_rec_03; execute select * from redo_size; 5 before and after executing all the preceding statements. the result is as follows:
When redo_size is used, insert 177821968 4 '25 "insert append 3590412 3 '15" copy 124438620 4 '20 "data volume: 495665 www.2cto.com. Conclusion: insert takes the most time, and redo takes the most.
Insert append requires the shortest time and the minimum redo volume.
Copy does not require dblink.

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.