Within the task, identified by the uniquely generated name returned from the previous procedure,
we identify the object to be analyzed with DBMS_ADVISOR.CREATE_OBJECT. Depending on the
type of object, the second through the sixth arguments vary. For tables, we only need to specify the
schema name and the table name.
Using DBMS_ADVISOR.SET_TASK_PARAMETER, we tell Segment Advisor to give all possible
recommendations about the table. If we want to turn off recommendations for this task, we would
specify FALSE instead of TRUE for the last parameter.
Finally, we initiate the Segment Advisor task with the DBMS_ADVISOR.EXECUTE_TASK
procedure. Once it is done, we display the identifier for the task so we can query the results
in the appropriate data dictionary views.
Now that we have a task number from invoking Segment Advisor, we can query DBA_
ADVISOR_FINDINGS to see what we can do to improve the space utilization of the
HR.EMPLOYEES table:
SQL> select owner, task_id, task_name, type,
2 message, more_info from dba_advisor_findings
3 where task_id = 384;
OWNER TASK_ID TASK_NAME TYPE
---------- ------- --------- ------
RJB 6 TASK_00003 INFORMATION
MESSAGE
--------------------------------------------------
Perform shrink, estimated savings is 107602 bytes.
MORE_INFO
---------------------------------------------------------------------
Allocated Space:262144: Used Space:153011: Reclaimable Space :107602:
The results are fairly self-explanatory.
Pages:
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340