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: statistics for COB

Re: statistics for COB

From: Brian Peasland <dba_at_remove_spam.peasland.com>
Date: Wed, 17 Dec 2003 21:56:13 GMT
Message-ID: <3FE0D0FD.708CD042@remove_spam.peasland.com>


> I have an Oracle database with one million records in it. It is actually an
> Oracle DB with OID running above for LDAP.
> I order to optimize the response time of my database I was advised to run
> the following SQL command on each table for Optimizer to be efficient and
> have a significant gain in my response times :
> analyze table my_table estimate statistics sample 30 percent;

Which version of Oracle? If you are using 8i or above, then you should really be using the DBMS_STATS package instead of the older ANALYZE TABLE command.  

> I have 2 questions :
> - What is the usual gain when running such script ?

There is no "usual" gain in performance. In some situations, you may actually experience worse performance! It all depends on too many factors to be able to predict something that will usually happen. It sounds to me like you might be well served by reading the Oracle docs on the Cost Based Optimizer.

> - When I run it, can I continue reading, creating or deleting records or
> should I stop everything ?

You can continue your normal processing.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
 the three"
Received on Wed Dec 17 2003 - 15:56:13 CST

Original text of this message

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