Bug 63561 - JDBC Request: Allow to only fetch a certain number of rows
Summary: JDBC Request: Allow to only fetch a certain number of rows
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.2
Hardware: All All
: P2 enhancement (vote)
Target Milestone: JMETER_5.2
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2019-07-11 13:00 UTC by Franz Schwab
Modified: 2019-11-07 09:38 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Schwab 2019-07-11 13:00:42 UTC
How about enhancing the JDBC sampler to only fetch a certain number of rows from the database (the result set of a select query)?

My use case is database load testing. In 99% of the cases I use the JDBC sampler for, I am only interested in the time it took the database to run the query.
I am not interested in the time it took the client (JMeter in that case) to fetch the result set.
A BI client for example might run a query with a big result set, but maybe only fetch the first 100 rows and not the whole result set.
Currently, there is no option in JMeter to do so.
Even when you set the "Count Records" option in JMeter, the whole result set is fetched (in order to count the rows). There is no option to get the result set size without fetching it (this is JDBC standard).
It is not an option to add a LIMIT clause at the end of the query, as databases might have an optimization for that.
For the same reason, it is also not an option to use the JDBC parameter ResultSet.setMaxRows(int).
I am only interested in knowing that the query has been processed successfully (= didn't throw an error).

This is a new bug/feature request, I accidentally hijacked the following bug initially:
https://bz.apache.org/bugzilla/show_bug.cgi?id=41921
Comment 1 Franz Schwab 2019-07-11 13:05:41 UTC
Some discussion already took place here:
https://github.com/frschwab/jmeter/commit/102f0ac58af82a28e01565047f3d114366996231
Comment 2 Franz Schwab 2019-07-11 13:21:20 UTC
Pull request: https://github.com/apache/jmeter/pull/476
Comment 3 UbikLoadPack support 2019-07-26 11:17:23 UTC
Merged in trunk:
https://github.com/apache/jmeter/commit/ab9770b88bef2e99f61af0388a9c8e61de940f23
Comment 4 光年 2019-11-07 09:38:38 UTC
没有中文汉化
Comment 5 The ASF infrastructure team 2022-09-24 20:38:17 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5118