473,416 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Difference between runstats and reorgchk ?

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 ?

--
Jari Korkiakoski | ja**************@iki.fi |#include <stddisclaimer.h>
http://wwwkeys.eu.pgp.net:11371/pks/...rch=0x81F43B00
Nov 12 '05 #1
5 16450
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.

Nov 12 '05 #2
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


Jari Korkiakoski wrote:
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 ?

Nov 12 '05 #3
Ian
Jari Korkiakoski wrote:
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).
Nov 12 '05 #4
On 2005-03-21, Ian <ia*****@mobileaudio.com> wrote:
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.

--
Jari Korkiakoski | ja**************@iki.fi |#include <stddisclaimer.h>
http://wwwkeys.eu.pgp.net:11371/pks/...rch=0x81F43B00
Nov 12 '05 #5
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.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Jari Korkiakoski" <ja**************@iki.fi> a écrit dans le message de
news:d1**********@plaza.suomi.net...
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 ?

--
Jari Korkiakoski | ja**************@iki.fi |#include <stddisclaimer.h>
http://wwwkeys.eu.pgp.net:11371/pks/...rch=0x81F43B00


Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Amit | last post by:
Hi: I'm trying to manually compute the ISIZE in REORGCHK for indexes in DB2 v8 (fp 4). Based on the documentation in Administrative Guide for v8, for non lob fields ISIZE should be the...
2
by: Jeff | last post by:
Hi, I am issuing "reorgchk update statistics on table all" and getting (after 6 minutes) SQL0911N The current transaction has been rolled back because of a deadlock or timeout. REason code "2"....
7
by: Todd McNeill | last post by:
Hi- Something was just pointed out to me this morning. According to the V8 Command Reference, the RUNSTATS command no longer uses the SHRLEVEL CHANGE/REFERENCE clauses, and it looks to be...
1
by: hikums | last post by:
1. I did a reorgchk, and found that F2 on table and F4 on index indicates a reorg is necessary. 2. Did a reorg. 3. Again I do a reorgchk, the report is the same as in Step 1 4. I do a...
4
by: kenfar | last post by:
I've got a large table on db2 8.2.1 that I rarely perform runstats on. It has about 600 million rows organized in a single MDC time dimension on a non-dpf warehouse. Anyhow, we recently ran...
2
by: EpsilonAurigae | last post by:
does anyone have an idea as to why the reorgchk utility says that a particular table needs to be reorged even after running the reorg command on that particular table. answer is appreciated.
4
by: santhosh.david | last post by:
Hi, I have a query in reorgchk. When I was examining the output of reorgchk I found a column TSIZE in Table Statistics & ISIZE in Index Statistics. Can any one let me know the formula for TSIZE...
0
by: Sam Durai | last post by:
Which runstats options are specified when runstats is invoked from "reorgchk update statistics" Env : DB2 V8.2
7
by: Okonita via DBMonster.com | last post by:
Hi all, I am very surprised to see that after doing a Reorgchk followed by reorg of selected tables and concluding with a runstats of the reorged tables, all of the tables continue to be...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.