Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / March 2005

Tip: Looking for answers? Try searching our database.

Difference between runstats and reorgchk ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jari Korkiakoski - 21 Mar 2005 15:53 GMT
Hello,

What kind of difference does it make to update statistics
via 'REORGCHK UPDATE STATISTICS ON TABLE ALL' or by running
directly 'runstats on table xxx.yyy with distribution and detailed
indexes all" for all tables ?

Signature

Jari Korkiakoski | jari.korkiakoski@iki.fi |#include <stddisclaimer.h>
http://wwwkeys.eu.pgp.net:11371/pks/lookup?op=get&search=0x81F43B00

cbielins@gmail.com - 21 Mar 2005 18:55 GMT
We use it because you can determine runstats by schema and not just
tabname.  So you can do a reorgchk on a certain schema, which will
runstat all tables in the schema, whereas if you do runstats alone,
then you need to do it table by table.
Christos Kalantzis - 21 Mar 2005 18:55 GMT
ROERGCHK is a utility to determine if a table needs to be REORG'ed

However you usualy want to make that determination using updated
statistics.  So "REORGCHK UPDATE STATISTICS ON TABLE ALL" runs a
RUNSTATS on the table before running the REORGCHK utility on it.

REORGCHK, on its own, does nothing to optimize a table, as stated above,
its a utility to determine if a table needs to be REORG'ed based on the
current statistics.

Hope this helps.

Christos

> Hello,
>
> What kind of difference does it make to update statistics
> via 'REORGCHK UPDATE STATISTICS ON TABLE ALL' or by running
> directly 'runstats on table xxx.yyy with distribution and detailed
> indexes all" for all tables ?
Ian - 21 Mar 2005 21:02 GMT
> Hello,
>
> What kind of difference does it make to update statistics
> via 'REORGCHK UPDATE STATISTICS ON TABLE ALL' or by running
> directly 'runstats on table xxx.yyy with distribution and detailed
> indexes all" for all tables ?

When REORGCHK calls runstats, it simply does "RUNSTATS on table".

If you want distribution statistics and/or detailed index stats,
like statistics, etc. you need to use RUNSTATS directly (and then
execute REORGCHK separately).
Jari Korkiakoski - 21 Mar 2005 21:29 GMT
>> What kind of difference does it make to update statistics
>> via 'REORGCHK UPDATE STATISTICS ON TABLE ALL' or by running
>> directly 'runstats on table xxx.yyy with distribution and detailed

> When REORGCHK calls runstats, it simply does "RUNSTATS on table".

Thanks for the answer. In the company I work for we've been
using "RUNSTATS ON TABLE"-construct (with distribution and detailed
index updates) for quite some time, but a while ago a colleague of
mine was being told that statistics should always be updated with
'reorgchk'-utility as running 'RUNSTATS'-manually against a
table wouldn't produce same results. As I couldn't find anything
supporting this statement from DB2 documentation, I decided to
ask the question in here.

Signature

Jari Korkiakoski | jari.korkiakoski@iki.fi |#include <stddisclaimer.h>
http://wwwkeys.eu.pgp.net:11371/pks/lookup?op=get&search=0x81F43B00

Pierre Saint-Jacques - 24 Mar 2005 00:57 GMT
The main difference is as follows:
REORGCHK will run the stats on on or more tables, in the same way they were
last run.
This means if you ran with distribution statisitics and detailed indexes it
will also run the stats in that way from the REORGCHK command.  Note that
you cannot specify that in the reorgchk command.

Doing a runstats command will pick up the stats in the way you specify in
the command, with or without distribution and detailed indexes.
It also resets those options so that if you run REORGCHK it will run the
stats as specified in the last way you ran them.

HTH,  Pierre.

Signature

Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515

> Hello,
>
> What kind of difference does it make to update statistics
> via 'REORGCHK UPDATE STATISTICS ON TABLE ALL' or by running
> directly 'runstats on table xxx.yyy with distribution and detailed
> indexes all" for all tables ?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.