-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue in SQL testcases including ExecuteBatch function #209
Comments
OK. I'm happy to fix all the executeBatch tests if you can explain to me the best way you think it can be fixed. Is there a way to discard any previous queries on each request? Or create a new connection object each time in order to throw away the previous queries? I'll admit I haven't focused on performance much, but happy to help make it better when issues are identified. |
Hi |
Awesome. Any chance you could fork the project, implement the change, test it, and if it works, issue a pull request for me to merge the change in? Seems like a quick fix. |
Yeah, I will perform the required changes and then will create a PR |
Hi @davewichers |
This was fixed when #210 above was merged. |
Hi
I was using the Owasp benchmark application for testing purpose. During testing the SQL APIs, I found that sometimes DB was responding very slowly.
On debugging, I found that Some of the SQL testcases were using executeBatch function and the connection object "conn" was a static object due to which we append the SQL in existing SQL statement. In this way SQL queries in "stmt" object were accumulating all the queries on every request.
e.g. If I run 5000 http requests for SQL testcase BenchmarkTest02647 then we will start with 1 query in stmt, on next request there will be two queries and.... so on. So on 5000th http request, there will be total 5000 SQL queries to be executed in batch leading to performance degradation for Database. and this number will continue to increase when we increase the number of request.
Testcase on which issue can be reproduced: BenchmarkTest02647
The text was updated successfully, but these errors were encountered: