最近做项目的时候需要导入一批3000多万条的POI数据到Oracle数据库,简单的插入导入速度太慢,使用sqlldr 批量导入3000多万条数据花了20分钟左右,速度还可以,现在分享给大家,具体方法如下:
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)