/************对象检查点的概念****************/
即仅把与对象所属的dirty block自buffer cache 的checkpoint queue写入到数据文件中
/*************查看与对象相关的检查点*********/
SQL> select * from v$statname where name like '%object%' and STATISTIC#=108;
STATISTIC# NAME CLASS STAT_ID
---------- ---------------------------------------------------------------- ---------- ----------
108 DBWR object drop buffers written 8 658143835
/*********查看对象检查点的参数值*************/
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
0
/********创建测试表*********/
SQL> create table t_object_checkpoint(a int);
Table created
/*******创建表不产生对象检查点********/
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
0
/*******插入数据**********/
SQL> insert into t_object_checkpoint values(1);
1 row inserted
/************插入数据不产生对象检查点************/
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
0
SQL> commit;
Commit complete
/***同上commit********/
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
0
SQL> delete from t_object_checkpoint;
1 row deleted
/******delete也不产生对象检查点********/
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
0
SQL> truncate table t_object_checkpoint;
Table truncated
/***truncate产生对象检查点********/
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
2
SQL> drop table t_object_checkpoint;
Table dropped
/****drop table 产生对象检查点*********/
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
4
/*********创建另一个测试表**********/
SQL> create table t_ckpt(a int);
Table created
/****查看对象检查点信息*****/
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
4
SQL> alter table t_ckpt add b int;
Table altered
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
4
SQL>
SQL> ---未添加表记录前的ddl不产生对象检查点
SQL>
SQL>
SQL>
SQL> ---插入表记录
SQL> insert into t_ckpt values(1);
insert into t_ckpt values(1)
ORA-00947: not enough values
SQL> insert into t_ckpt values(1,2);
1 row inserted
SQL> commit;
Commit complete
SQL> alter table t_ckpt add c int;
Table altered
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
4
SQL> --插入表记录后的ddl也不产生对象检查点
SQL>
SQL>
SQL> update t_ckpt set c=10;
1 row updated
SQL> commit;
Commit complete
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
4
/****alter table rename column不产生对象检查点*********/
SQL> alter table t_ckpt rename column c to c_new;
Table altered
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
4
SQL> create index idx_ckpt on t_ckpt(a);
Index created
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
4
SQL> drop index idx_ckpt;
Index dropped
SQL> select value from v$sysstat where STATISTIC#=108;
VALUE
----------
6
SQL> ---drop index会产生对象检查点
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-758818/ ,如需转载,请注明出处,否则将追究法律责任。