sql - 如何禁用在 Redshift 查询中使用缓存结果?

标签 sql amazon-web-services amazon-redshift

我对在 Redshift 中测试我的查询的性能感兴趣。

我想禁止查询使用来自先前查询的任何缓存结果。换句话说,我希望查询从头开始运行。是否可以仅在执行我的查询时禁用缓存结果?

我不想禁用整个数据库/所有查询的缓存结果。

最佳答案

SET enable_result_cache_for_session TO OFF;

来自 enable_result_cache_for_session - Amazon Redshift :

Specifies whether to use query results caching. If enable_result_cache_for_session is on, Amazon Redshift checks for a valid, cached copy of the query results when a query is submitted. If a match is found in the result cache, Amazon Redshift uses the cached results and doesn’t execute the query. If enable_result_cache_for_session is off, Amazon Redshift ignores the results cache and executes all queries when they are submitted.

关于sql - 如何禁用在 Redshift 查询中使用缓存结果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54805231/

相关文章:

c# - 连接到 Redshift VPC C#

null - 使用 Redshift 将空值替换为最后一个非空值

amazon-redshift - Redshift 复制和自动增量不起作用

mysql - 如何在 sql 查询中替换 UNION

php - 如果连接查询中没有 B 值,则获取具有 A 值的项目(重复项目)

spring - 将 AWS documentDB 附加到 Spring Boot 应用程序

node.js - AWS Load Balancer,为 HTTPS 启用监听器并路由到 80

mysql - 比较两个表并插入不完全匹配的行

java - 有效地为来自 2 个不同服务器的 N 个值选择 Top/Max/Avg(任何聚合函数)

xml - AWS API 网关接受内容类型 : application/xml