

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。有关更多信息，请参阅[博客文章](https://www.amazonaws.cn/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

# enable\_result\_cache\_for\_session
<a name="r_enable_result_cache_for_session"></a>

## 值（默认为粗体）
<a name="r_enable_result_cache_for_session-values"></a>

on（true），**off（false）**

## 说明
<a name="r_enable_result_cache_for_session-description"></a>

指定是否使用查询结果缓存。如果 `enable_result_cache_for_session` 是 `on`，则在提交查询时，Amazon Redshift 会检查有无查询结果的有效缓存副本。如果在结果缓存中找到匹配项，Amazon Redshift 会使用缓存的结果而不执行查询。如果 `enable_result_cache_for_session` 是 `off`，则 Amazon Redshift 会忽略结果缓存，并在所有查询提交时运行查询。

## 示例
<a name="r_enable_result_cache_for_session-example"></a>

```
SET enable_result_cache_for_session TO off;
--Amazon Redshift now ignores the results cache
```