Oracle 参数 APPROX_FOR_AGGREGATION 官方解释,作用,如何配置最优化建议
本站中文解释
APPROX_FOR_AGGREGATION参数是用于决定ORACLE是否应使用精确统计信息(例如AVG、SUM、COUNT)还是使用模糊统计信息(APPROX_COUNT、APPROX_SUM)。
设置此参数为TRUE时,Oracle将会优先使用模糊统计信息;设置此参数为FALSE时,Oracle将会永远使用精确统计信息。
与精确统计信息相比,模糊统计信息可以提供更快的查询执行时间,但是在查询结果精度上存在一些削弱。应该根据实际需要来决定TP_FOR_AGGREGATION代参数。
官方英文解释
APPROX_FOR_AGGREGATION
replaces exact query processing for aggregation queries with approximate query processing.
Property | Description |
---|---|
Parameter type |
Boolean |
Default value |
|
Modifiable |
|
Modifiable in a PDB |
Yes |
Range of values |
|
Basic |
No |
Oracle RAC |
Different instances can use different values. |
Data analysis applications heavily use aggregate function and analytic function queries. Aggregation functions and analytic functions require sorting of large volumes of data, and exact query answering requires lots of memory, and can be time consuming. With approximate query processing, the results of aggregate function and analytic function queries are returned much faster than with exact query processing. Approximate query processing is useful for situations where a tolerable amount of error is acceptable in order to obtain faster query results.
The values that can be set are:
-
false
:Approximate query processing is not used for aggregation queries and analytic queries.
-
true
: Approximate query processing is used for aggregation queries and analytic queries.
See Also:
-
“APPROX_FOR_COUNT_DISTINCT”
-
“APPROX_FOR_PERCENTILE”