I am creating a JDBC performance test using JMeter to evaluate the performance of a set of queries on a RedShift cluster.
On RedShift, ResultSet caching is enabled by default and it can be disabled on single sessions by using the statement
SET enable_result_cache_for_session=false;
As documented here.
I cannot find a way to run this statement in JMeter before running my queries. If I insert it before the actual JDBC Request, JMeter complains about expecting exactly one query.
If I create in my thread group a "Once Only Controller" which is executed before running the queries (which are in a random order controller in the same thread group), its execution doesn't seem to affect caching:
Query time varies from 30 seconds for the first run to 250ms for subsequent ones.
The same happens if I try to setup a JDBC PreProcessor for each single query.
Is there a way to run this preliminary query using jmeter? Alternatively, is there a way to globally disable caching on a Redshift cluster?



