Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: analyzing tables

Re: analyzing tables

From: Ulrik Hoffmann <ulrik_at_hoffmann-kiel.de>
Date: Thu, 11 Nov 1999 19:31:08 +0100
Message-ID: <80f21s$sf06$1@fu-berlin.de>


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

>

> What is the "best" way to set up an automatic analyzing schedule for
> your tables? Is this something best handled by the job manager in OEM?
Received on Thu Nov 11 1999 - 12:31:08 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US