一直以为index的created
time是index创建结束后的时间,但实际上不是,下面是一个测试:
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 -
Prod
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for 32-bit Windows: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
SQL> select sysdate from dual;
SYSDATE
-------------------
2012-03-12 11:06:44 ==index开始创建的时间
SQL> set timing on;
SQL> create index x1_ggs_t1 on ggs_t1(object_name)
tablespace users pctfree 90
nologging;
索引已创建。
已用时间: 00: 00: 19.40
SQL> set timing off;
SQL> select sysdate from dual;
SYSDATE
-------------------
2012-03-12 11:07:04 ==index创建结束的时间
SQL> select object_name,created from user_objects
where object_name='X1_GGS_T1';
OBJECT_NAME CREATED
------------------------------ -------------------
X1_GGS_T1 2012-03-12 11:06:44 ==字典记录的是开始创建index时间非结束时间SQL>
select index_name,LAST_ANALYZED from user_indexes;
INDEX_NAME LAST_ANALYZED
------------------------------ -------------------
X1_GGS_T1 2012-03-12 11:07:04 ==分析的时间是index结束的时间