|
用难看的方式实现了大整数和NULL
text *sqlstmt = (text *)"INSERT INTO yourcube (c1,c2,c3,c4,cv,sv,gid) \
values (decode(:c1,15,NULL,:c1),decode(:c2,127,NULL,:c2),decode(:c3,127,NULL,:c3),\
decode(:c4,127,NULL,:c4),:cv,:sv+:sv1*4294967296,:gid)";
速度慢很多
D:\app\instantclient10_1>..\map9d LT/LT@10.6.132.43/orcl query="select c1,c2,c3,c4,v from t" file=NUL
0 rows exported at 2010-03-09 12:34:29
recn=0
500000 rows exported at 2010-03-09 12:34:30
recn=500000
1000000 rows exported at 2010-03-09 12:34:32
output file closed at 1000000 rows.
sum=1
sum(c1+c2+c3+v)=500111497488
sum(c4)=51690810
从数据库把表读入内存3073ms
4,5,67,114,152760
申请map内存0ms
申请一层内存15ms
新建一层节点468ms,recn=1000000,每毫秒读2136行,每毫秒写2136节点
申请后面内存32ms,1000000
新建后面节点2121ms,recn=2299600,每毫秒读471行key,每毫秒写612节点
0,first=2,renc=0
1,first=1000007F,renc=1000003
2,first=20007F00,renc=1000002
3,first=30007F7F,renc=2260123
4,first=407F0000,renc=1000001
5,first=507F007F,renc=2260125
6,first=607F7F00,renc=2284774
7,first=707F7F7F,renc=2284669
8,first=8F000000,renc=1000000
9,first=9F00007F,renc=2260124
10,first=AF007F00,renc=2273610
11,first=BF007F7F,renc=2284668
12,first=CF7F0000,renc=2284775
13,first=DF7F007F,renc=2299366
14,first=EF7F7F00,renc=2299485
15,first=FF7F7F7F,renc=2299599
汇总后面节点140ms,recn=2299600,每毫秒读7142行,每毫秒写9282行
Total number of rows to be inserted is 1000000
插入结果表time=4618
Total number of rows to be inserted is 1299600
插入结果表time=5741
释放所有动态内存0ms,2299600
释放所有map内存218ms,2299600
总时间13603ms,2299600
3步(读入+运算+写出)总时间16676ms
Exiting with SUCCESS status 0
[ 本帖最后由 〇〇 于 2010-3-9 12:41 编辑 ] |
|