1
votes

I'm trying to implement a kind of slowdown of the processing on the client side in such a way that the Statement of ResultSet object should have fetch size limited to 1. So with this scenario I want to maximize round trips to the database while iterating within ResultSet.

The JMeter UI doesn't allow specify these parameters of Statement or ResultSet, so I wonder if there's a work around to achieve the behavior I described above.

Vladimir.

2

2 Answers

0
votes

JMeter allows executing arbitrary SQL statements, ResultSet size depends on how many rows does query return.

So you should be able do something like:

select * ... limit 1;

or

select top 1 from ...;

to ensure ResultSet will contain only one entry.

See SQL SELECT TOP Clause for examples for different RDBMS systems.

I believe Debugging JDBC Sampler Results in JMeter article will also be helpful.

0
votes

Having not found good response for my question I have created my own JMeter plugin that allows to control fetchSize() and ResultSet read delay. Available freely at https://github.com/vklevko/jmeter-jdbc-sampler-advanced