我对在 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
ison
, 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. Ifenable_result_cache_for_session
isoff
, Amazon Redshift ignores the results cache and executes all queries when they are submitted.
关于sql - 如何禁用在 Redshift 查询中使用缓存结果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54805231/