How to disable using cache results in Redshift Query?

天大地大妈咪最大 提交于 2020-08-19 20:34:05

问题


I am interested in performance testing my query in Redshift.

I would like to disable the query from using any cached results from prior queries. In other words, I would like the query to run from scratch. Is it possible to disable cached results only for the execution of my query?

I would not like to disable cached results for the entire database/all queries.


回答1:


SET enable_result_cache_for_session TO OFF;

From 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.



来源:https://stackoverflow.com/questions/54805231/how-to-disable-using-cache-results-in-redshift-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!