MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RUNSTATS DB2 10 z/OS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Wed Aug 26, 2015 11:27 am    Post subject: RUNSTATS DB2 10 z/OS Reply with quote

Our shop runs Runstats on a regular basis. When writing queries in Data Studio and running them thru the analyzer it sometimes recommends new Runstats to make the query efficient.

My question is: Does the recommended Runstats overlay the shop created Runstats? Or does it create an additional Runstat to use until the next Batch Production job runs?
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Aug 26, 2015 1:25 pm    Post subject: Re: RUNSTATS DB2 10 z/OS Reply with quote

NASCAR9 wrote:
My question is: Does the recommended Runstats overlay the shop created Runstats? Or does it create an additional Runstat to use until the next Batch Production job runs?


Nascar9,

How exactly is your shop creating the run stats? Are you physically updating the sysibm tables with the latest information?

When you run the Utilities like REORG the runstats gets updated. However if you are doing a lot of inserts and deletes programmatically you might end up having a bad stats.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Wed Aug 26, 2015 1:45 pm    Post subject: Reply with quote

kolusu,

The batch job runs the runstats based on a query to determine if they need to be run. Yes they update the sysibm tables. We are also using Real Time Statistics.

I'm asking because I get asked to run many queries that pull large amounts data, joining to many tables. I also try and use indexes when possible. Sometimes that's not possible.

Before I run any large query, I always run it thru the Data Studio Optimizer. The Optimizer will sometimes give suggestions for additional statistics. I'm just trying to make sure I'm not destroying Production Stats running my suggested stats.
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Aug 26, 2015 2:25 pm    Post subject: Reply with quote

NASCAR9,

Unless you are updating the sysibm tables via Data studio optimizer, I don't think the suggested stats are overlaying the contents. How about you do a simple test and take the run stats values before you run your query and also after you run your query which does have the suggested stats.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Thu Aug 27, 2015 10:38 am    Post subject: Reply with quote

kolusu,
I did what you suggested in the TEST DB.

1. In Data Studio I checked the Timestamp for the indexes for the table.
2. I ran the recommended statistics.
3. Refreshed my Index list in Data Studio and checked the Timestamps again.

They didn't change.

If anyone has a query to list the statistics for a particular table/table space please post it.

Still not 100% positive I want to do this in Production. The query may ease my mind.
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group