|
本帖最后由 tangjiangdong 于 2018-2-5 15:04 编辑
老师你好,关于oracle11g不收集统计信息,有个问题想请教一下:
1.查看打开状态
- SQL> select client_name,status from dba_autotask_client;
复制代码
CLIENT_NAME STATUS
---------------------------------------------------------------- --------
auto optimizer stats collection ENABLED
auto space advisor ENABLED
sql tuning advisor ENABLED
2.查看最新的统计信息时间- select *
- from(select t.OWNER,t.TABLE_NAME,t.LAST_ANALYZED
- from dba_tab_statistics t
- where t.LAST_ANALYZED is not null
- order by t.LAST_ANALYZED desc)
- where rownum < 11;
复制代码
OWNER TABLE_NAME LAST_ANALYZED
------------------------------ ------------------------------ -------------
SFBPM FM_FORM_HEADER 2018/1/31 17:
GREENOFFICE USER_PROFILE 2018/1/3 22:4
GREENOFFICE USER_PORTAL_PROFILE 2018/1/3 22:4
GREENOFFICE TM_TASK_ROUTINE 2018/1/3 22:4
GREENOFFICE UPLOADED_FILES 2018/1/3 22:4
GREENOFFICE STRING_RESOURCES 2018/1/3 22:4
GREENOFFICE SYSTEM_CONFIG 2018/1/3 22:4
GREENOFFICE SYSTEM_CODE_LOCAL 2018/1/3 22:4
GREENOFFICE SYSTEM_CODE_GLOBAL 2018/1/3 22:4
GREENOFFICE SYSTEM_CODE_CATEGORY 2018/1/3 22:4
10 rows selected
3.查看自动收集任务历史执行状态
- SQL> select * from DBA_AUTOTASK_JOB_HISTORY;
复制代码
CLIENT_NAME WINDOW_NAME
WINDOW_START_TIME WINDOW_DURATION
JOB_NAME
JOB_STATUS JOB_START_TIME
JOB_DURATION JOB_ERROR JOB_INFO
----------------------------------------------------------------
-----------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-------------------------------------------------------------------------------- ------------------------------
--------------------------------------------------------------------------------
-------------------------------------------------------------------------------- ----------
--------------------------------------------------------------------------------
- SQL> select * from DBA_AUTOTASK_CLIENT_HISTORY;
复制代码
CLIENT_NAME WINDOW_NAME
WINDOW_START_TIME WINDOW_DURATION
JOBS_CREATED JOBS_STARTED JOBS_COMPLETED WINDOW_END_TIME
----------------------------------------------------------------
-----------------------------------------------------------------
--------------------------------------------------------------------------------
-------------------------------------------------------------------------------- ------------ ------------ --------------
--------------------------------------------------------------------------------
从上面的输出可以知道库是有开启自动统计信息功能,但却并没自动收集的记录,这是怎么回事呢?
|
|