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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Schedule Analyze using DBMS_STATS ???

RE: Schedule Analyze using DBMS_STATS ???

From: Stephen Andert <StephenAndert_at_firsthealth.com>
Date: Tue, 03 Jun 2003 09:54:56 -0800
Message-ID: <F001.005A923F.20030603095456@fatcity.com>


With some versions, dbms_stats has issues with partitions. Since we use partitioning, we wrote a script to simulate the gather stale functionality. Monitoring is enabled and we do a compute of any table or partition thereof that has more than x% modified. This is essentially what the gather stale command does, but our script has the benefit that we can adjust the percantage if we feel it is necessary. Though in about 1 1/2 years, we haven't felt it neccessary to adjust that number. We choose to do a full COMPUTE since each partition is relatively small and the whole analyze_stale runs well within our maintenance window.

We are close to being mostly on 9i and will be looking at dbms_stats to see if we can start using it.

Stephen

>>> Rajendra.Jamadagni_at_espn.com 06/03/03 09:59AM >>>
We don't "analyze" schema, we use dbms_stats ...

I wrote a package that analyzes everything using dbms_stats and (for my
instance) it runs in 10 parallel streams. It splits all the tables in 10
streams so that all of them take approximately same amount of time. This package captures the time it takes to analyze each table, everyday and
balances the table among 10 parallel streams.

I prefer to use cron, but you can use it with dbms_job as well.

Currently it does only tables (and cascades to indexes automatically). We
don't deal with partitions right now, so that needs to be added. After a
certain number of rows, it collects stats in parallel too. I am currently
working on interfacing it with dba_tab_modifications ... so the logic will
decide if the table changes are say < 5%, skip the table from stats collections.

Raj




Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art !

-----Original Message-----
Sent: Tuesday, June 03, 2003 11:05 AM
To: Multiple recipients of list ORACLE-L

Thanks Mark - That is exactly what I was just getting ready to write!

Dennis Williams
DBA, 80%OCP, 100% DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephen Andert
  INET: StephenAndert_at_firsthealth.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jun 03 2003 - 12:54:56 CDT

Original text of this message

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