Home | Previous Page | Next Page   Improving UDR Performance > Optimizing a User-Defined Routine >

Updating Statistics for an SPL Routine

The database server stores statistics about the amount and nature of the data in a table in the systables, syscolumns, and sysindices system catalog tables. The statistics that the database server stores include the following information:

The query optimizer uses these statistics to determine the cost of each possible query plan. Run UPDATE STATISTICS to update these values whenever you have made a large number of changes to the table.

The UPDATE STATISTICS statement can have no modifying clauses or several modifying clauses, as in the following statements:

UPDATE STATISTICS FOR TABLE tablename
UPDATE STATISTICS FOR ROUTINE routinename

Execution of UPDATE STATISTICS affects optimization and changes the system catalog in the following ways:

After the database server reoptimizes SQL statements, it updates the sysprocplan system catalog table with the reoptimized execution plan. For more information about sysprocplan, refer to the IBM Informix: Guide to SQL Reference. For more information about the UPDATE STATISTICS statement, refer to the IBM Informix: Guide to SQL Syntax.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]