|
原帖由 loveleana 于 2007-12-2 00:55 发表 ![]()
nocode大大,我是这样测试的:
1.autocommit 0;
2.call ttOptGetFlag('passthrough');显示当前级别是2
3.call ttOptSetFlag('passthrough',3);这时没反应,passthrough还是2,可能是我的ODBC设置问题.
4.call ttOptSetFlag('passthrough',1);
5.passthrough 3;
6.update xxxxx
7.load cache group xx where (主键 in (xxx)) commit every 0 rows parallel 2;
8.passthrough 2;
9.commit;
如果usmanaged cache group设置autorefresh,会在Oracle端建触发器,感觉很怪,如果是计费/帐务系统的表,
一般都不会在上面建触发器的吧?
不过你上班后,如果方便的话,给我个例子看看吧,谢谢了.我们公司的某个系统,可能会用到TT,现在在选型,
在altibase和tt间选,所以我想先学习下TT,不过没抓到什么诀窍,文档都是英文的,看起来比较吃力.
我还想问下 ropagate,DurableCommits,Isolation是什么意思?
我现在只是小小的PSO(类似售后维护这样的),DBA,是我的目标呢,有更好的职业发展前途,就算很忙,也觉得值
呀.是不是?以后可能还会有cache administrator这种职业呢.
我个人觉得usermanaged cache group设置为autorefresh才体现出了这种类型cache group的价值。如果你只想单向传递数据,
用SWT或AWT就行了。
我做了一个小测试,你可以看下:
Command> create usermanaged cache group usercache
> autorefresh mode incremental
> interval 10 seconds
> from readtab (
> a number not null primary key,
> b varchar2(31),
> propagate);
Command> load cache group usercache commit every 256 rows;
4 cache instances affected.
Command> select * from readtab;
< 1, hello >
< 2, world >
< 3, Hello >
< 4, Again >
4 rows found.
Command> update readtab set a=5 where a=1;
1000: Cannot set primary key columns to different values
The command failed.
这时候是失败的,
Command> autocommit 0;
Command> call ttOptSetFlag('passthrough',3);
Command> update readtab set a=5 where a=1;
1 row updated.
Command> commit;
Command> select * from readtab;
< 1, hello >
< 2, world >
< 3, Hello >
< 4, Again >
4 rows found.
可以看到,执行成功了,但为什么没有变化呢,过10秒在看:
Command> select * from readtab;
< 2, world >
< 3, Hello >
< 4, Again >
< 5, hello >
4 rows found.
Command>
oracle端已经把数据反向刷新回来了。
你是联通还是移动的人呢?呵呵。我觉得帐务数据还是不要用实时同步的方式,这种方式更适合查询为主,更新很小的系统,AWT个人觉得更适合帐务系统这种更新频繁处理量大的应用。但既然是异步就很可能出现两端数据不一致,所以要通过其他一些手段来控制。
propagate在TT这里的大概意思就是把TT的数据传到oracle。
DurableCommits和Isolation你说的是ODBC里的定义吧,前者是表示是否在事务提交时把log落到磁盘,缺省好些是0,不实时落地。好处是效率更高,缺点是可能会丢数据。后者叫隔离级别,这个讲起来比较复杂,是数据库的一个基本概念,设置的目的主要为了找到一个性能与一致性的平衡点,你可以上网搜搜,一般用默认的read-committed就行,serializable级别高,但会造成性能降低。 |
|