The Native/Local connection is too slow. [JDBC463] #502
Submitted by: John Kilin (johnkilin)
I try select 1 million records by jaybird-full-3.0.0-beta-1.jar.
The text was updated successfully, but these errors were encountered:
Commented by: John Kilin (johnkilin)
In table 75 fields:
Commented by: @mrotteveel
The test case I used reads 100,000 rows from a single table with 8 columns (some int, timestamp, date, numeric, char and varchar columns).
Jaybird 3 beta 1 pure java: +/- 900 ms
Changing the implementation to JNA direct mapping did not help that much:
Jaybird 3 with JNA direct mapping: +/- 52000 ms
After some more reading it looks like JNA writes all Java values from a Structure to their native counterpart for each native invocation and reads them back after. This can be disabled, but then you need to manually take care of reading/write those fields. Implementing this changed the run time to +/- 1600 ms.
As I do not really like the extra complication of direct mapping, I also tried this without, and then the run time was +/- 2100 ms.
For now I will use this last solution (manually syncing structure fields, no direct mapping). If it turns out this is really not enough, I can still go to direct mapping. However the fact this seems to perform better than Jaybird 2.2 looks hopeful.
I will do some more testing, because clearly my earlier performance tests were wrong.