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: ANALYZE command question.

Re: ANALYZE command question.

From: Heggelund <d92hegge_at_ix_prod.hfk.mil.no>
Date: 1997/03/07
Message-ID: <1997Mar7.143734.19502@ix_prod.hfk.mil.no>#1/1

Your analyze is actually more than enough in most cases. analyze <table_name> estimate statistics sample 20 percent; is normally sufficent on 7.2 and 7.3. It is less accurate but it runs a lot faster.

The 'for' clause is used for generating histograms and should not be used on a general basis. It should only be used where you know you have a skewed index where the index efficency dependes on the value used in the query. The query accessing this index can not use bind variables for this column (meaning your library cache get less efficient). The reason for not using 'for' on a general basis is because it makes the optimization of queries a bit slower because the optimizer have to take the histograms into consideration when creating the execution plan for the query.

In other words, don't use it unless you know it will help on a paricular problem.

Rgds
Steinar Heggelund Received on Fri Mar 07 1997 - 00:00:00 CST

Original text of this message

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