Oracle uses stored procedure Insert loop to insert large data method ____oracle

Source: Internet
Author: User


When we test the data or do some kind of large amount of data, we can use the statement for mass insert,

My test, 100,000 data insertion time of 7 seconds or so, 1 million record insertion time of 65 seconds, 2 million inserted into 150 seconds.

My machine is configured for CPU I5 2450M memory 4G hard drive west data 500G 5400 to WIN7 64 bit, database for Oracle 11G 64 bit Insert test tool for Pl\sql 9.0

declare
i integer;--Define variable
begin
I: = 1;
Loop/
* Insert data/inserts into
USER (YHBH, YHMC, YHMM, Bmbh, Yhzt, ZCSJ, ZJDLSJ, Yhks, YHZW, yhms)
values
_char (' 99999999 ' + i),
' username ',
' password ',
' 1 ',
' 1 ',
sysdate,
sysdate,
' Research and Development Center ',
' product manager ',
' senior Software engineer ';
/* Parameter Increment * *
I: = i + 1;
/* Stop condition *
/exit when i > 2000000;
End Loop;
commit;
End


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.