Closed naxels closed 3 years ago
There's an Oracle section in Tips & Tricks but it's pretty minimal right now. These would be great tips to add there:
The following text has been added to the Oracle section of Tips & Tricks:
An important performance issue to be aware of with Oracle's JDBC driver is that the default fetch size is just 10 records. If you are working with large datasets, you will
either need to either specify :prefetch
in your db-spec hash map with a suitable value (say 1,000 or larger), or specify &prefetch=
in your JDBC URL string. If you want
to keep the default, you can change it on a per-statement basis by specifying :fetch-size
as an option to execute!
etc.
Absolutely perfect, thanks! :)
Is your feature request related to a problem? Please describe. When trying to process a 1000+ record set it seems as if everything slows to a grinding halt for next.jdbc, while in reality the Oracle JDBC driver has a default setFetchSize of 10 records (per Statement) and a default PrefetchValue of 10 as well (per Connection), meaning it will contact the database for every 10 records you want to fetch.
Describe the solution you'd like I would like to see an update to the documentation in the proper place so that it is clear to anyone using the Oracle JDBC and next.jdbc that by either updating the connection string and setting an addition :prefetch option:
or jdbc connection string (in my case a Thin/SID based), setting &prefetch=:
or adding the {:fetch-size } param to the query they want to execute:
This problem is resolved.
Thank you, Patrick