When searching, see the followingArticleIt feels very powerful. Q: How Does Oracle insert multiple data records at a time? -[Computer] A: read all the data from a CSV file and insert it into an Oracle database. In a few minutes, there are about 0.6 million data records.
Someone said on the Internet that you can insert thousands of records in a loop and then insert them into the commit file. I rely on it. Try it on your own !! If you have never tried it, do not mislead others.
Some people have said that Oracle does not support multiple inserts at a time. I rely on it. Why don't you say that you are not skillful at learning?
Now I want to introduce you to the following tips: in Oracle, there is a strange table named dual. We need to use this dual to make an article,
First, do you know what the result of select '1' from dual is? By the way, the result is 1.
Second, you know
Select '1' from dual
Union
Select '2' from dual
What is the result? The result is
1
2
So the most important thing is that,
Insert into Table Name (Field 1)
Select '1' from dual
Union
Select '2' from dual
This time, two pieces of data are inserted. Of course, if the full field is inserted (Field 1), it can be omitted.
The final practice proves that if 0.6 million insert statements are cyclically executed, the execution will not be completed in an hour (of course, the machine may be too bad), and the execution will be combined into 1000 select statements and inserted again, the time for inserting 0.6 million data records is 20 minutes, and the time for inserting 5000 data records is 12 minutes.
Good luck.