updstats versus dostats
Posted in 2003
Topics: Performance & Tuning
I compared the output of dostats and updstats for
the same table and they were almost identical
save for :
dostats.post
::::::::::::::
UPDATE STATISTICS MEDIUM FOR TABLE cdr_post_conf DISTRIBUTIONS ONLY;
updstats.post
::::::::::::::
UPDATE STATISTICS MEDIUM FOR TABLE cdr_post_conf
(participant_num,conf_type_code,bridge_id,card_num,cdr_status,reserver_title,res
v_id,resv_lines,
service_provider,sub_id,chairperson_name,reservation_op_id,voting_duration,q_a_d
uration,resv_begin,
resv_end,oper_notes,adver_code,r_auto_lo_conf,r_fax_confirm,r_mon_100,r_announce
,r_announce_late,
r_music,r_roll_call,r_smart_poll,r_operator_tone,r_conf_record,r_auto_dial,r_sec
urity_enable,
r_pre_notify,r_full_duplex,u_no_show,u_cancelled) DISTRIBUTIONS ONLY;
The Performance tuning class (ages ago) recommended the dostats method.
Any suggestions, strong opinions?
Sam Gentsch
Informix Database Evangelist
303.223.6641
Voyant Technologies, Inc.
"The leader in group voice communication."
The class you took was based on
the recommendations in the Performance Guide
which is the method I implemented in dostats, so it's no wonder it looks
familiar. I personally doubt that it makes a difference in performance of the
update stats command itself whether it is done as a table level command, as in
dostats, or as a column list command with all columns listed, as updstats does.
The stats generated at any rate will be identical. The only possible
difference would be in execution time. Time both on your table and see.
Without any options dostats and updstats produce identical results. Dostats
adds additional value in the options it provides extending its capabilities
beyond what updstats can do. For example:
The -g option runs HIGH's for columns used in fragmentation expressions which
are not already at HIGH level due to leading an index.
The -b & -B options implement 'Browse mode' which selects tables which have had
their row count change be more than a specified percentage since stats were
last
updated.
The -a & -A options implement 'Aging mode' which selects tables which have not
had their stats updated in a specified number of days.
Using -b & -a together allow one to run dostats nightly but have it update most
tables only weekly or monthly while updating active tables more frequently as
needed.
The -p option specifies a specific PDQPRIORITY to be used to compile stored
procedures so that can differ from the PDQPRIORITY level used to update table
stats.
The -i & -x options allow one to specify lists of tables to forceably include
or
exclude from dostats processing.
The -R, -r, & -c options allow one to adjust the default resolutions and
confidence levels of the commands dostats outputs.
The -m options allows updating stats on system catalog tables normally ignored.
Art S. Kagel
----- Original Message -----
From: Sam Gentsch <sgent@voyanttech.com>
At: 9/25 14:54
> I compared the output of dostats and updstats for the same table and they
were
> almost identical
> save for :
> dostats.post
> ::::::::::::::
>
> UPDATE STATISTICS MEDIUM FOR TABLE cdr_post_conf DISTRIBUTIONS ONLY;>
> updstats.post
> ::::::::::::::
>
> UPDATE STATISTICS MEDIUM FOR TABLE cdr_post_conf>
(participant_num,conf_type_code,bridge_id,card_num,cdr_status,reserver_title,res
> v_id,resv_lines,
>
service_provider,sub_id,chairperson_name,reservation_op_id,voting_duration,q_a_d
> uration,resv_begin,
>
resv_end,oper_notes,adver_code,r_auto_lo_conf,r_fax_confirm,r_mon_100,r_announce
> ,r_announce_late,
>
r_music,r_roll_call,r_smart_poll,r_operator_tone,r_conf_record,r_auto_dial,r_sec
> urity_enable,
> r_pre_notify,r_full_duplex,u_no_show,u_cancelled) DISTRIBUTIONS ONLY;
>
> The Performance tuning class (ages ago) recommended the dostats method.
>
> Any suggestions, strong opinions?
>
>
> Sam Gentsch
> Informix Database Evangelist
> 303.223.6641
> Voyant Technologies, Inc.
> "The leader in group voice communication."