30 January 2007

Were those statistics collected with dbms_stats or analyze command?

If the column dba_tables.global_stats is:
Example:

SQL> analyze table tanya compute statistics;
Table analyzed.

SQL> select OWNER, TABLE_NAME, GLOBAL_STATS
from dba_tables where table_name='TANYA';

OWNER TABLE_NAME GLO
----------- ---------------- ---
SYS TANYA NO

SQL> EXECUTE DBMS_STATS.GATHER_TABLE_STATS('SYS','TANYA');
PL/SQL procedure successfully completed.

SQL> select OWNER, TABLE_NAME, GLOBAL_STATS
from dba_tables where table_name='TANYA';

OWNER TABLE_NAME GLO
----------- ---------------- ---
SYS TANYA YES

Thanks to Keith Harding for sharing this interesting information with me.

From Metalink Note 236935.1:

Keywords: "dba_tables.global_stats" "analyze vs dbms_stats" "analyze or dbms_stats" "dbms_stats or analyze"

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?