Categories:

System functions

SYSTEM$ESTIMATE_QUERY_ACCELERATION

For a previously executed query, this function returns a JSON object that specifies if the query is eligible to benefit from the query acceleration service. If the query is eligible for query acceleration, the output includes the estimated query execution time for different query acceleration scale factors.

See also:

QUERY_ACCELERATION_ELIGIBLE view

语法

SYSTEM$ESTIMATE_QUERY_ACCELERATION( '<query_id>' )

参数

query_id

Query ID. Query ID must be for a query executed within the last 14 days; otherwise, the status is invalid.

输出

该函数返回一个 JSON 对象,其属性如下所述:

eligibleThe query can benefit from query acceleration.
ineligibleThe query cannot benefit from query acceleration.
acceleratedThe query has already been accelerated.
invalidThe query with the specified ID was not found.
eligibleThe query can benefit from query acceleration.
ineligibleThe query cannot benefit from query acceleration.
acceleratedThe query has already been accelerated.
invalidThe query with the specified ID was not found.The query with the specified ID was not found.
invalidThe query with the specified ID was not found.The query with the specified ID was not found.
upperLimitScaleFactor

Number of the highest query acceleration scale factor in the estimatedQueryTimes object. If the status for the query is not eligible for query acceleration, this field is set to 0.

In the estimatedQueryTimes object, each name / value pair specifies a query acceleration scale factor and the estimated query execution time at that scale factor.

The following example lists the estimated query execution time for the scale factors 1, 2, 4 and 8:

...
"estimatedQueryTimes" : {
  "1" : 171,
  "2": 152,
  "4": 133,
  "8": 120
}
...

使用说明

  • 估算的查询时间仅用于分析目的,不能保证。
  • Estimated query times are calculated based on the assumption that the query is serviced by all the compute resources allocated by the query acceleration service based on scale factor.
  • 估算的查询时间不考虑并发性。

示例

For example queries, see Identifying queries with the SYSTEM$ESTIMATE_QUERY_ACCELERATION function.