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: Ho to do it in PARALELL (multiple ANALYZE TABLE at the same time)

Re: Ho to do it in PARALELL (multiple ANALYZE TABLE at the same time)

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Wed, 14 Nov 2001 21:36:38 +0000
Message-ID: <3BF2E3E6.6CB2@yahoo.com>


Andreas Wizemann wrote:
>
> Hi,
> i need to run ANALYZE TABLE on lots of tables.
> So i wrote a script to do it. But it only does one command at a time.
> Is there a way to do this statement in "background" as i can do in
> unix with adding an & (Ampersand) at the end of the line ?
>
> Regards
> Andreas
> Andreas Wizemann

Script 1:
select 'analyze ... etc'
from user_objects
where object_type = 'TABLE'
and mod(object_id,2) = 0

Script 2:
select 'analyze ... etc'
from user_objects
where object_type = 'TABLE'
and mod(object_id,2) = 1

That lets you parallelize them ... Alternatively, I've got a similar pl/sql routine on my site (see sig)

hth
connor

-- 
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."
Received on Wed Nov 14 2001 - 15:36:38 CST

Original text of this message

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