Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: analyzing tables
Hi,
for example, pass as sSYSTEM a pl/sql-block with sql-plus to the db:
declare
a pls_integer;
begin
dbms_job.submit(a,'dbms_utility.analyze_schema('SCOTT','ESTIMATE');',
trunc(sysdate+1)+1/24*2,'trunc(sysdate+1)+1/24*2');
commit;
end;
/
the dbms_utility.analyze schema will do the analyze-thing in the Schema
'SCOTT',
you can use compute instad of estimate if you have the time...
The dbms_job.submit creates a job with first run at trunc(sysdate+1)+2/24
(tomorrow
at 2 AM), and after that each day at 2 AM.
Hope that helped,
Uli
>