|
无意发现,如果目标表有数据,直接路径插入加快了很多
D:\app\instantclient10_1>..\d LT/LT@10.6.132.43/orcl query="select * from t" file=NUL
0,1 1,1 2,1 3,1 4,4
0 rows exported at 2010-04-27 13:53:51
recn=0
500000 rows exported at 2010-04-27 13:53:52
recn=500000
1000000 rows exported at 2010-04-27 13:53:52
output file closed at 1000000 rows.
sum=1
sum(c1+c2+c3+v)=500111497488
sum(c4)=51690810
从数据库把表读入内存1736ms
4,5,67,114,152760
申请map内存0ms
申请一层内存18ms
新建一层hashmap节点316ms,recn=1000000,每毫秒读3164行,每毫秒写3164节点
申请后面内存18ms,1000000
realloc2000000
gid=1 found 0 time
新建后面节点[1],recn=2273836
新建后面节点[2],recn=2284894
新建后面节点[3],recn=2284894
新建后面节点[4],recn=2299600
新建后面节点[5],recn=2299600
新建后面节点[6],recn=2299600
新建后面节点965ms,recn=2299600,每毫秒读1036行key,每毫秒写1346节点
malloc time=0ms
let time=5ms
Initializing the environment..
Logged on as LT
col0:c1 3 1
col1:c2 3 1
col2:c3 3 1
col3:c4 3 1
col4:cv 3 4
col5:sv 3 8
col6:gid 3 1
time=46ms
col_ary_rows=4096,col_ary_cols=7
1000all time=5412ms
插入结果表1000000行
malloc time=0ms
let time=8ms
col0:c1 3 1
col1:c2 3 1
col2:c3 3 1
col3:c4 3 1
col4:cv 3 4
col5:sv 3 8
col6:gid 3 1
time=15ms
col_ary_rows=4096,col_ary_cols=7
600all time=3046ms
插入结果表1299600行
释放所有动态内存4ms,2299600
释放所有map内存172ms,2299600
总时间9964ms,2299600
3步(读入+运算+写出)总时间11728ms
Exiting with SUCCESS status 0
SQL> select count(*) from yourcube;
COUNT(*)
----------
2299600
已用时间: 00: 00: 00.45
D:\app\instantclient10_1>..\d LT/LT@10.6.132.43/orcl query="select * from t" file=NUL
0,1 1,1 2,1 3,1 4,4
0 rows exported at 2010-04-27 13:55:09
recn=0
500000 rows exported at 2010-04-27 13:55:10
recn=500000
1000000 rows exported at 2010-04-27 13:55:10
output file closed at 1000000 rows.
sum=1
sum(c1+c2+c3+v)=500111497488
sum(c4)=51690810
从数据库把表读入内存1768ms
4,5,67,114,152760
申请map内存0ms
申请一层内存18ms
新建一层hashmap节点321ms,recn=1000000,每毫秒读3115行,每毫秒写3115节点
申请后面内存18ms,1000000
realloc2000000
gid=1 found 0 time
新建后面节点[1],recn=2273836
新建后面节点[2],recn=2284894
新建后面节点[3],recn=2284894
新建后面节点[4],recn=2299600
新建后面节点[5],recn=2299600
新建后面节点[6],recn=2299600
新建后面节点970ms,recn=2299600,每毫秒读1030行key,每毫秒写1339节点
malloc time=0ms
let time=5ms
Initializing the environment..
Logged on as LT
col0:c1 3 1
col1:c2 3 1
col2:c3 3 1
col3:c4 3 1
col4:cv 3 4
col5:sv 3 8
col6:gid 3 1
time=47ms
col_ary_rows=4096,col_ary_cols=7
1000all time=2511ms
插入结果表1000000行
malloc time=0ms
let time=8ms
col0:c1 3 1
col1:c2 3 1
col2:c3 3 1
col3:c4 3 1
col4:cv 3 4
col5:sv 3 8
col6:gid 3 1
time=17ms
col_ary_rows=4096,col_ary_cols=7
600all time=3191ms
插入结果表1299600行
释放所有动态内存4ms,2299600
释放所有map内存184ms,2299600
总时间7233ms,2299600
3步(读入+运算+写出)总时间9038ms
Exiting with SUCCESS status 0
D:\app\instantclient10_1>
SQL> select count(*) from yourcube;
COUNT(*)
----------
4599200
已用时间: 00: 00: 00.89 |
|