Objective
Recently do projects need to import a batch of 3000多万条 POI data to Oracle database, simple insert import speed is too slow, use SQLLDR batch import 3000多万条 data spent 20 minutes, speed can also, now share to everyone, the specific methods are as follows:
1. New import Control file Input.ctl, file contents as follows:
Load data
Characterset UTF8
Infile ' H:\POI\baidu.txt '
Append into table Tbl_poi_baidu
fields Terminated by "," optionally enclosed by "" '
trailing nullcols
(Poi_name,class_all,addr,phone,tel, Longitude,latitude,city,citycode,province,district,street,streenumber,class_1,class_2,class_3,class_4)
2. Command Line window Input:
Note: The file character set should be consistent with the character set such as Oracle service, suggest file Save as UTF-8 without BOM, import file add Characterset UTF8
, resolve Oracle Data import Chinese garbled:export NLS_LANG='SIMPLIFIED CHINESE_CHINA.AL32UTF8'
Fast file Merging in DOS environment: copy *.csv newfile.txt
Summarize
The above is the entire content of this article, I hope to be able to learn or use Oracle database Help, if there is doubt you can message exchange.