You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing this library to generate a quite large report with over ~150k rows from an SQL database, one of the issues I found was that it was taking so much time (~3 minutes) and it was due to the rather low value of rows fetched per network call, ie: if no value is specified using the setFetchSize method of the statement, it fetches 10 rows at a time by default, which means over 15k network calls to the database.
Once I overwrote the query method from the JdbcHelper class and specified 1000 rows as the fetch size, the same report took only ~25s.
So I am proposing to create a new constructor for the JdbcHelper class which allows to specify the fetchSize to use. The implementation is pretty simple so I can create the PR, but I am not sure if this can be tested because the the in-memory database probably won't be affected by a network optimization.
The text was updated successfully, but these errors were encountered:
That would be an option, however, I am not sure if it is possible to specify such properties without using the JDBC URL, because that would affect the whole application using the connection.
According to this, it is possible but is driver specific, so one would have to check if the connection is an instance of a class to use the specific method for that class.
In short, I think it would be a lot of less hassle if it the JdbcHelper class supports it as an optional parameter of the constructor.
Hi there,
I was testing this library to generate a quite large report with over ~150k rows from an SQL database, one of the issues I found was that it was taking so much time (~3 minutes) and it was due to the rather low value of rows fetched per network call, ie: if no value is specified using the
setFetchSize
method of the statement, it fetches 10 rows at a time by default, which means over 15k network calls to the database.Once I overwrote the
query
method from theJdbcHelper
class and specified 1000 rows as the fetch size, the same report took only ~25s.So I am proposing to create a new constructor for the
JdbcHelper
class which allows to specify the fetchSize to use. The implementation is pretty simple so I can create the PR, but I am not sure if this can be tested because the the in-memory database probably won't be affected by a network optimization.The text was updated successfully, but these errors were encountered: