View previous topic :: View next topic
|
Author |
Message |
LearningDb2
New User
Joined: 19 Jun 2009 Posts: 40 Location: India
|
|
|
|
hi,
i am working on db2 v9.1 z/os
I have a Tablespace which contains 3 tables.I once(2 weeks before) inserted around 2 lac rows in one of its table but later i deleted them and at present they have around 400 rows in total for all tables.
But when i query the catalog table sysibm.systablespacestats then i still find the value under "total rows" as above 2 lacs.The updatestatstime column has the latest value.
Pls help me in knowing how and when the real time statistics gets updated and why the exact count in the total rows section is not coming.
please correct if i am wrong any where. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
RUNSTATS. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
RTS are only written out every 30 minutes. the exact interval is in some zparm, but default to 30 minutes.
Updatestatstime has the time of last time the RTS was written out for that tablespace.
Is reorglasttime or loadrlasttime filled in ?
I know of no reason why totalrows could be different from the actual n° rows at updatestatstime. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
dbzTHEdinosauer wrote: |
RUNSTATS. |
the all point of RTS is to NOT needing runstats to know |
|
Back to top |
|
|
LearningDb2
New User
Joined: 19 Jun 2009 Posts: 40 Location: India
|
|
|
|
hi guyc
thanx for your reply.Ihave the following values.
LOADRLASTTIME
--------------------------
2009-09-13-08.58.47.659385
REORGLASTTIME
--------------------------
2009-09-12-05.38.44.386920
REORGINSERTS
------------
230173
TOTALROWS
--------------------
230173 |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
which means there were 230173 inserts since 2009-09-13-08.58.47.659385
I guess this was a load replace with an empty file and that
REORGDELETES and REORGMASSDELETE are both 0.
If you have done deletes after loadrlastime and before updatestatstime
there should be a number in one of those columns, and totalrows shouldn't be 230173.
the zparm is STATSINT
I found this online :
Quote: |
In certain situations, the RTS values may not be 100% accurate. Situations that can cause the real time statistics to be off include:
Sometimes a restarted utility can cause the RTS values to be wrong
Utility operations that leave indexes in a restrictive state, such as RECOVER pending (RECP) will cause stats to be inaccurate.
A DB2 subsystem failure
A notify failure in a data sharing environment
To fix RTS statistics that are inaccurate, run a REORG, RUNSTATS, or COPY on the objects for which that stats are suspect. Furthermore, if you are using DB2 utilities from a third party vendor other than IBM, be sure that those utilities work with RTS. The third party utilities should be able both to reset the RTS values and use the RTS stats for recommending when to run utilities. |
|
|
Back to top |
|
|
LearningDb2
New User
Joined: 19 Jun 2009 Posts: 40 Location: India
|
|
|
|
hi guyc ,
thanx for ur reply.
i think a runstat is going to help me......
Quote: |
To fix RTS statistics that are inaccurate, run a REORG, RUNSTATS, or COPY on the objects for which that stats are suspect. |
|
|
Back to top |
|
|
|