IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Real time statistics for tablespaces


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Tue Nov 03, 2009 8:14 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Nov 03, 2009 8:22 pm
Reply with quote

RUNSTATS.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Nov 03, 2009 8:27 pm
Reply with quote

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
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Nov 03, 2009 8:28 pm
Reply with quote

dbzTHEdinosauer wrote:
RUNSTATS.
the all point of RTS is to NOT needing runstats to know
Back to top
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Tue Nov 03, 2009 8:53 pm
Reply with quote

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
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Nov 03, 2009 9:12 pm
Reply with quote

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
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Wed Nov 04, 2009 1:16 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top