Re: Last time update stats ran
Posted in 1997
Yes Manoj, this is for High and Medium and extends to the column level if
you include some of the other items from the sysdistrib table. We don't
perform up stats low because it provides no distribution info to the
optimizer. It simply notes the true number of records in the table and
what indexes exist.
I usually perform a high on the keys only. I will also run a medium on the
whole table (before the high keys) if there are areas in the application
that involve 'where' clauses on non-key columns. Every DBA has a different
approach and it usually amounts to trying to out-smart the optimizer. I
have heard that Informix is working on options to 'hint' the optimizer.
that will really help and possibly remove some of the voo-doo like
approaches we seem to take.
Take care.
Manoj <manoj@mailhost.twowaytv.co.uk> wrote in article
> But this would only indicate if an UPDATE STATS ran in High or Medium
mode would it not ?
>
> From: Chuck Ludwigsen [SMTP:cludwigsen@harrahs.com]
> Art S. Kagel wrote:
> > Carl Gruber wrote:
> > >
> > > His everyone!
> > >
> > > Is there an easy way to tell when the last time an "update stats" ran
for
> > > a particular table?
> >
> > No. Create a table and have your update statistics job maintain a
> > record there, perhaps one row per database or even per table.
> >
> > Art S. Kagel
>
> Beg to differ Art. Look at the contents of sysdistrib and notice the
> column named constructed. That is the date the distribution info was
> generated by update statistics.
>
> Therefore, run this query:
>
> select distinct tabname, b.constructed, b.mode
> from systables a, sysdistrib b
> where a.tabid=b.tabid
> order by 1>
> ----
Chuck Ludwigsen <cludwigs@hotmail.com>
Sr Engineer <cludwigsen@worldnet.att.net>
Summit Data Group
President - Memphis Informix UsrGrp <miug@hotmail.com>
** Formerly of Harrah's Entertainment -- Moving on to bigger things **
** My opinions are my own and might conflict with those of my employer **