SQL> select name,value from v$sysstat where name like '%user%';
NAME VALUE
---------------------------------------------------------------- ----------
user commits 204
user rollbacks 0
user calls 403
user I/O wait time 70
SQL> select name,value from v$sysstat where name like '%user%';
NAME VALUE
---------------------------------------------------------------- ----------
user commits 207
user rollbacks 0
user calls 412
user I/O wait time 70
SQL> select name,value from v$sysstat where name like '%user%';
NAME VALUE
---------------------------------------------------------------- ----------
user commits 210
user rollbacks 0
user calls 438
user I/O wait time 70
这三次查询之间我没有做任何的commit,commit数量为什么会自动增加呢?而且每次增加3?
另起一个session,多次执行commit但并没有做dml,再次查询user commits仍未增加。
SQL> select name,value from v$sysstat where name like '%user%';
NAME VALUE
---------------------------------------------------------------- ----------
user commits 210
user rollbacks 0
user calls 442
user I/O wait time 70
连接到scott
insert into e select * from e;
commit;
SQL> select name,value from v$sysstat where name like '%user%';
NAME VALUE
---------------------------------------------------------------- ----------
user commits 211
user rollbacks 0
user calls 446
user I/O wait time 70
做了dml然后commit,user commits会立即增加。
而rollback却不同,没有dml执行rollback操作之后user rollbacks数量会增加,是因为commit和rollback机制不同的问题吗?
执行rollback
SQL> select name,value from v$sysstat where name like '%user%';
NAME VALUE
---------------------------------------------------------------- ----------
user commits 214
user rollbacks 1
user calls 453
user I/O wait time 70 |
|