AppLib ESTIMATE STATISTICS FOR SCHEMA
From Eigenpedia
(Redirected from LucidDbAppLib ESTIMATE STATISTICS FOR SCHEMA)
Contents |
Syntax
CALL APPLIB.ESTIMATE_STATISTICS_FOR_SCHEMA( schemaname ) CALL APPLIB.ESTIMATE_STATISTICS_FOR_SCHEMA( schemaname, samplingrate )
Purpose
Executes 'analyze table' with 'estimate statistics for all columns' for all tables in a schema, with an optional sampling rate. Without a sampling rate, LucidDb automatically chooses an appropriate sampling rate for the number of rows present in each table.
Use caution when providing a sampling rate as it will be applied to all tables in the schema. If the sample size (sampling rate multiplied by row count) for a table is too small, the statistics may be inaccurate. Conversely, high sampling rates negate the performance benefits of estimating, rather than computing, statistics.
Parameters
- schemaname: name of schema containing tables to estimate stats for [VARCHAR(255)]
- samplingrate: percentage of rows in each table to sample [FLOAT]; valid values are greater than 0 and less than, or equal to, 100
Example
CALL APPLIB.ESTIMATE_STATISTICS_FOR_SCHEMA( 'TESTSCHEMA' ) CALL APPLIB.ESTIMATE_STATISTICS_FOR_SCHEMA( 'TESTSCHEMA', 50.0 )
(doesn't return anything)

