- DYNAMIC_SAMPLING Hint Description of the illustration dynamic_sampling_hint.gif(See "Specifying a Query Block in a Hint", tablespec::=)The DYNAMIC_SAMPLING hint instructs the optimizer how to control dynamic sampling to improve server performance by determining more accurate predicate selectivity and statistics for tables and indexes.You can set the value of DYNAMIC_SAMPLING to a value from 0 to 10. The higher the level, the more effort the compiler puts into dynamic sampling and the more broadly it is applied. Sampling defaults to cursor level unless you specify tablespec.The integer value is 0 to 10, indicating the degree of sampling.If a cardinality statistic already exists for the table, then the optimizer uses it. Otherwise, the optimizer enables dynamic sampling to estimate the cardinality statistic.If you specify tablespec and the cardinality statistic already exists, then:If there is no single-table predicate (a WHERE clause that evaluates only one table), then the optimizer trusts the existing statistics and ignores this hint. For example, the following query will not result in any dynamic sampling if employees is analyzed:SELECT /*+ DYNAMIC_SAMPLING(e 1) */ count(*) FROM employees e;If there is a single-table predicate, then the optimizer uses the existing cardinality statistic and estimates the selectivity of the predicate using the existing statistics.To apply dynamic sampling to a specific table, use the following form of the hint:SELECT /*+ DYNAMIC_SAMPLING(employees 1) */ * FROM employees WHERE ...See Also:Oracle Database Performance Tuning Guide for information about dynamic sampling and the sampling levels that you can set
- DYNAMIC_SAMPLING Hint Description of the illustration dynamic_sampling_hint.gif(See "Specifying a Query Block in a Hint", tablespec::=)The DYNAMIC_SAMPLING hint instructs the optimizer how to control dynamic sampling to improve server performance by determining more accurate predicate selectivity and statistics for tables and indexes.You can set the value of DYNAMIC_SAMPLING to a value from 0 to 10. The higher the level, the more effort the compiler puts into dynamic sampling and the more broadly it is applied. Sampling defaults to cursor level unless you specify tablespec.The integer value is 0 to 10, indicating the degree of sampling.If a cardinality statistic already exists for the table, then the optimizer uses it. Otherwise, the optimizer enables dynamic sampling to estimate the cardinality statistic.If you specify tablespec and the cardinality statistic already exists, then:If there is no single-table predicate (a WHERE clause that evaluates only one table), then the optimizer trusts the existing statistics and ignores this hint. For example, the following query will not result in any dynamic sampling if employees is analyzed:SELECT /*+ DYNAMIC_SAMPLING(e 1) */ count(*) FROM employees e;If there is a single-table predicate, then the optimizer uses the existing cardinality statistic and estimates the selectivity of the predicate using the existing statistics.To apply dynamic sampling to a specific table, use the following form of the hint:SELECT /*+ DYNAMIC_SAMPLING(employees 1) */ * FROM employees WHERE ...See Also:Oracle Database Performance Tuning Guide for information about dynamic sampling and the sampling levels that you can set
- DYNAMIC_SAMPLING Hint Description of the illustration dynamic_sampling_hint.gif(See "Specifying a Query Block in a Hint", tablespec::=)The DYNAMIC_SAMPLING hint instructs the optimizer how to control dynamic sampling to improve server performance by determining more accurate predicate selectivity and statistics for tables and indexes.You can set the value of DYNAMIC_SAMPLING to a value from 0 to 10. The higher the level, the more effort the compiler puts into dynamic sampling and the more broadly it is applied. Sampling defaults to cursor level unless you specify tablespec.The integer value is 0 to 10, indicating the degree of sampling.If a cardinality statistic already exists for the table, then the optimizer uses it. Otherwise, the optimizer enables dynamic sampling to estimate the cardinality statistic.If you specify tablespec and the cardinality statistic already exists, then:If there is no single-table predicate (a WHERE clause that evaluates only one table), then the optimizer trusts the existing statistics and ignores this hint. For example, the following query will not result in any dynamic sampling if employees is analyzed:SELECT /*+ DYNAMIC_SAMPLING(e 1) */ count(*) FROM employees e;If there is a single-table predicate, then the optimizer uses the existing cardinality statistic and estimates the selectivity of the predicate using the existing statistics.To apply dynamic sampling to a specific table, use the following form of the hint:SELECT /*+ DYNAMIC_SAMPLING(employees 1) */ * FROM employees WHERE ...See Also:Oracle Database Performance Tuning Guide for information about dynamic sampling and the sampling levels that you can set
- DYNAMIC_SAMPLING Hint