sysdistrib question
Posted in 2013
Topics: General Discussion
I'm looking at sysdistrib to see when to run stats(using dostats Thanks Art ;)) and I was going to key it off of the nupdates, ninserts, ndeletes columns. I don't think they are what I though they were though. The numbers don't match up to be the actual number of each since the time the stats were constructed. Can anyone shine some light on what these columns actually are? Or where I can find something similar for this? Thanks, Nate Hicks
Nate: These numbers are the number of rows updated, deleted or inserts since = the table was created to the time update statistics was run which is specified as constr_time in sysdistrib. If you want to know how much t= he table changed you can compare these stored numbers to the current numbe= r of rows updated, deleted or inserts which is stored in sysmaster. John F. Miller III STSM, Lead Architect miller3@us.ibm.com 503-747-1366 IBM Informix Dynamic Server (IDS) ids-bounces@iiug.org wrote on 09/04/2013 06:51:08 AM: > From: "NATE HICKS" <nathaniel.hicks@trnswrks.com> > To: ids@iiug.org, > Date: 09/04/2013 06:54 AM > Subject: sysdistrib question [31355] > Sent by: ids-bounces@iiug.org > > I'm looking at sysdistrib to see when to run stats(using dostats Than= ks Art > ;)) and I was going to key it off of the nupdates, ninserts, > ndeletes columns. > I don't think they are what I though they were though. The numbers > don't match > up to be the actual number of each since the time the stats were constructed. > Can anyone shine some light on what these columns actually are? Or > where I can > find something similar for this? > > Thanks, > > Nate Hicks > > > ***********************************************************************= ******** > Forum Note: Use "Reply" to post a response in the discussion forum.= >=
Those were the levels for the table at the time stats were last updated. They are compared to the values in sysptnhdr/sysactptnhdr to determine if stats need to be run. BTW, you do not need to use those numbers yourself, UPDATE STATISTICS does that for you automatically (unless you override it with the FORCE option) as long as you have AUTOSTATMODE set to 1 in the ONCONFIG file or force auto stats by adding the AUTO option to update statistics. You can use the dostats option --auto-run to force auto-mode stats or --force-run to override auto-mode and force stats to be calculated even if auto-mode is set and the STATLEVEL threshold for the table is not passed. So, while the dostats -a/-A options are still useful, pretty much the -b/-B "browse" options have been replaced by the engine's auto-mode statistics. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Wed, Sep 4, 2013 at 9:51 AM, NATE HICKS <nathaniel.hicks@trnswrks.com>wrote: > I'm looking at sysdistrib to see when to run stats(using dostats Thanks Art > ;)) and I was going to key it off of the nupdates, ninserts, ndeletes > columns. > I don't think they are what I though they were though. The numbers don't > match > up to be the actual number of each since the time the stats were > constructed. > Can anyone shine some light on what these columns actually are? Or where I > can > find something similar for this? > > Thanks, > > Nate Hicks > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --089e0160c454c3dc0f04e5921e06
We have a lot of queue tables staging tables and snapshot tables that do change often but could get stats run at inopportune times like when the count is low and they will no longer utilize indexes in that case...I believe that's right anyway. So if I use Auto Stats and it sees the changes on those tables it will still run stats even though that's not desired.
Yes it will. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Thu, Sep 5, 2013 at 2:22 PM, NATE HICKS <nathaniel.hicks@trnswrks.com>wrote: > We have a lot of queue tables staging tables and snapshot tables that do > change often but could get stats run at inopportune times like when the > count > is low and they will no longer utilize indexes in that case...I believe > that's > right anyway. So if I use Auto Stats and it sees the changes on those > tables > it will still run stats even though that's not desired. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --089e0160bab03a7df604e5d51ed7