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 Columns

Re: Analyze Columns

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 15 Apr 2003 12:21:15 -0700
Message-ID: <130ba93a.0304151121.32043948@posting.google.com>


I think you meant "Analyze TABLE tabname COMPUTE STATISTICS", not "ALTER TABLE...". "COMPUTE STATISTICS" alone will get you everything - statistics for table, columns and indexes. "FOR ALL COLUMNS" will NOT get you the stats for the indexes on the table - if it has any. "FOR ALL INDEXES" can be used, if you need to recalculate the stats for the indexes. You may want to look up the "MONITORING" clause of "ALTER TABLE" to gather the stats for you automatically.

"Oliver Stratmann" <stratmo_at_gmx.de> wrote in message news:<b7gnam$n7ib$1_at_ID-180535.news.dfncis.de>...
> Hello All,
>
> I have some questions about nalyzing tables and specific columns.
>
> We analyze our tables by
> "ALTER TABLE tabname COMPUTE STATISTICS" and afterwards
> "ALTER TABLE tabname COMPUTE STATISTICS FOR ALL COLUMNS"
> Does the second command enrich the tablestats or rewrite them? (Which would
> mean, that the second one would do all the work!)
>
> Now we are in a situation where a column has to be updated. I think we need
> to refresh the stats afterwards.
> Do I need both the Commands stated above?
> Is the second one sufficient?
> Or is it enough to do "ANALYZE TABLE tabname COMPUTE STATISTICS FOR COLUMNS
> colname"?
>
> Thanks for your help in advance!
>
> Have a nice day!
>
> Oli
Received on Tue Apr 15 2003 - 14:21:15 CDT

Original text of this message

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