Download Informix Guide to SQL: Syntax, Version 6.0

Transcript
UPDATE STATISTICS
umns rather than across the database. For very large tables, the database
server may scan the data once for each column. The amount of space designated by the DBUPSPACE environment variable determines the number of
times the table is scanned. For information about DBUPSPACE, see Chapter 4
of the Informix Guide to SQL: Reference.
If you do not specify a RESOLUTION clause, the default percentage is 0.5
percent.
Specifying MEDIUM Distributions
If you use the MEDIUM keyword, the data for the distributions is obtained by
sampling. Because the data obtained by sampling is usually much smaller
than the actual number of rows, the time required to construct MEDIUM distributions is less than that required for HIGH mode. MEDIUM distributions
require at least one scan of the table, so the creation of MEDIUM distributions
executes more slowly than the creation of LOW distributions.
If you do not specify a RESOLUTION clause, the default percentage is 2.5
percent. If you do not specify a value for conf, the default confidence is 0.95.
This can be roughly interpreted as meaning that 95 percent of the time, the
estimate is equivalent to using HIGH distributions.
Update Statistics and Temporary Tables
You can use UPDATE STATISTICS on temporary tables. You can explicitly
update the statistics for a temporary table or build distributions for a temporary table by specifying the name of the table. If you build distributions on all
of the tables in the database by using the FOR TABLE clause without a specific
table name, distributions will also be built on all of the temporary tables in
your session.
References
In the Informix Guide to SQL: Tutorial, see the discussion of UPDATE
STATISTICS in Chapter 13.
Syntax
1-397