Chuck Ludwigsen (cludwigsen@harrahs.com) wrote:
: 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
Does update statistics always generate distributions? No. So, Art's answer
is correct. You can't tell when statistics were last updated, but you can
tell the last time distributions were created.