looking for update statistics syntax 
Author Message
 looking for update statistics syntax

I am looking for a way to update all statistics on a
database.
It seems that all our inserts are not updating statistics.
I am reading them with dbArtisan.

  s.levy.vcf
< 1K Download


Sun, 08 Sep 2002 03:00:00 GMT
 looking for update statistics syntax

statistics only get updated when you run RUNSTATS.
The syntax is RUNSTATS ON TABLE table-name SHRLEVEL CHANGE
(the shrlevel change is recommended so you don't lock out other users while
you are running this).

If you want to do it on all tables in your system, construct a query which
looks something like:
Select 'Runstats on table ' || tabschema || '.' || tabname || ' shrlevel
change;' from syscat.tables where tabschema not like 'SYS%'
and pipe the output to a file. Then run the file through the DB2 clp with
db2 -tvf filename.

My query tool Advanced Query Tool (see www.cardett.co.nz) has features for
generating db2 command  statements such as this without having to code
catalog queries. This makes life a lot easier if you are doing this type of
thing on a frequent basis.

Phil Castle.


Quote:
> I am looking for a way to update all statistics on a
> database.
> It seems that all our inserts are not updating statistics.
> I am reading them with dbArtisan.



Mon, 09 Sep 2002 03:00:00 GMT
 looking for update statistics syntax
what statistics are these ?  Is this the catalgue that says how many rows in the
table ?
If that is the case, your right.  You must run a special program called
"runstats". This can be peformed from control center. find the table and then do
a right mouse click and pick "run statists".
Quote:

> I am looking for a way to update all statistics on a
> database.
> It seems that all our inserts are not updating statistics.
> I am reading them with dbArtisan.



Mon, 09 Sep 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Update statistics - looking for syntax

2. update statistics syntax error

3. Looking for guideline on when to run UPDATE STATISTICS

4. Performance Issues with UPDATE STATISTICS WITH FULLSCAN on _WA_Sys auto statistics

5. ANNOUNCE: Another update statistics utility - latest update

6. An update statistics program - updated version for you

7. Looking for database market size, share statistics or numbers

8. Update statistics

9. updating statistics and recompiling stored procedures

10. Update Statistics Error

11. auto update statistics


 
Powered by phpBB® Forum Software