Clear cache on AWS Redshift

旧时模样 提交于 2020-12-04 18:12:53

问题


I am doing testing against AWS Redshift, and to replicate real world scenarios I need my test queries to not be cached so as not to give a false picture of performance. Is there any way for me to clear the Redshift cache between query runs?


回答1:


I believe you can disable the cache for the testing sessions by setting the value enable_result_cache_for_session to off

From the documentation

If enable_result_cache_for_session is off, Amazon Redshift ignores the results cache and executes all queries when they are submitted.




回答2:


As far as I know - you can't. But for performance reasons and 'real world performance', as you mentioned, you should simply discard initial runs and use performance indicators from subsequent runs against warm cache. That sounds more real world than running against cold cache, which gives you worst case scenario. If you insist on measuring cold cache performance, the simplest (although time consuming) solution is to reboot cluster after every cold run.



来源:https://stackoverflow.com/questions/37039150/clear-cache-on-aws-redshift

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