Re: Update Statistics Question
Posted in 1997
> I understand the need for running UPDATE STATISTICS for the tables >in a database. The recalculated data from this command is going to be >placed in the systables, syscolumns, sysindexes and sysdistrib system >catalog tables. After updating statistics for user created tables is it then >necessary to run UPDATE STATISTICS against the system tables? Does Informix >automatically optimize queries against system tables? Is there any regular >maintenance that should be done against system tables or should I just leave >them alone and let Informix worry about them? Thanks. > >Dale Forrey, DBA email: forrey@wsu.edu >Information Technology FAX: (509) 335-0540 >Washington State University Phone: (509) 335-7098 >PO Box 641222 >Pullman, WA 99164-1222 > > This is a good question. No, it is not necessarry to run update statistics against the dictionary tables for normal processing, but it won't hurt. The reason that update statistics is done is to provide information to the optimizer so that the cost for the various query plans can be calculated. This information is then moved into the dictionary cache during the optimization phase of the query. The process to read the dictionary table information into the dictionary cache does not involve a query, but is directly read. Therefor there is no need for the information that update statistics produces. However, if user queries are made against the dictionary tables, then the information placed in the the dictionary by "update statistics" will be used to optimize the user query. Madison Pruet