RE: ORACLE automatic update statistics better??
- From: Michael Dinh <mdinh@xxxxxxxxx>
- To: "'mark.powell2@xxxxxx'" <mark.powell2@xxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
- Date: Fri, 13 Aug 2010 09:09:28 -0700
Isn't it better to use REPEAT for method_opt?
If auto statistic gathering is using histogram and you gather without
histogram, next time histogram will be gathered, no?
You can find the default method_opt by executing - select
dbms_stats.get_param('method_opt') from dual;
exec
dbms_stats.gather_table_stats(user,tabname=>'&tbl',estimate_percent=>1,cascade=>TRUE,method_opt=>'FOR
ALL COLUMNS SIZE REPEAT');
Michael Dinh : XIFIN : 858.436.2929
NOTICE OF CONFIDENTIALITY - This material is intended for the use of the
individual or entity to which it is addressed, and may contain information that
is privileged, confidential and exempt from disclosure under applicable laws.
BE FURTHER ADVISED THAT THIS EMAIL MAY CONTAIN PROTECTED HEALTH INFORMATION
(PHI). BY ACCEPTING THIS MESSAGE, YOU ACKNOWLEDGE THE FOREGOING, AND AGREE AS
FOLLOWS: YOU AGREE TO NOT DISCLOSE TO ANY THIRD PARTY ANY PHI CONTAINED HEREIN,
EXCEPT AS EXPRESSLY PERMITTED AND ONLY TO THE EXTENT NECESSARY TO PERFORM YOUR
OBLIGATIONS RELATING TO THE RECEIPT OF THIS MESSAGE. If the reader of this
email (and attachments) is not the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is
strictly prohibited. Please notify the sender of the error and delete the
e-mail you received. Thank you.
-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On
Behalf Of Powell, Mark
Sent: Friday, August 13, 2010 8:14 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: RE: ORACLE automatic update statistics better??
The Oracle provided job will gather histograms by default and that is pretty
the main difference from the statistics collection command you posted.
You should not need to manually gather statistics except in those cases where
you create and load a new table and want statistics now rather than wait on the
Oracle job task to generate statistics and in those cases where the generated
statistics do now work well. You may be better off without histograms on a
specific table, etc....
-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On
Behalf Of dba1 mcc
Sent: Friday, August 13, 2010 11:09 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: ORACLE automatic update statistics better??
we have ORACLE 10GR2 on LINUX server. Our consultant don't allow us "manually"
to run "update statistics". Consultant say ORACLE 10GR2 automatic update
statistics algorithm better than manually command.
The SQL command we used to manually run is:
execute DBMS_STATS.GATHER_SCHEMA_STATS (ownname=> UPPER('&ID'),
estimate_percent=> dbms_stats.auto_sample_size, method_opt=> 'FO R ALL INDEXED
COLUMNS SIZE 1', DEGREE=> DBMS_STATS.DEFAULT_DEGREE, cascade=>TRUE)
I would like listen your opinion.
Thanks.
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Other related posts: