How about adding a fetchSize attribute to the JdbcConnectionDescriptor and perhaps also to the query ?
Good idea.
> This way, the fetch size is tunable for jdbc drivers that support this.
Any JDBC driver should implement this method (its defined since JDBC 1.2) regardless of whether it actually does something.
Yep, they all do but PostgreSQL is one of the few that will actually care at all about the hint.
Also, we should perhaps have a reasonable default, e.g. 50 or something, for PostgreSQL ?!
That's the tricky bit - there is no reasonable global default since an application using only queries by iterator and such would benefit from fetchSize="1" always and an application that wants to get as much data as fast possible (with low JDBC overhead and minimal net traffic) wants fetchSize="<as huge as current JVM's -Xmx permits>".
OJB has no clue about max heap size in user's target environments and also knows nothing about the application profile (iterating vs fetch huge results vs everything in between).
But I guess "50" could be seen as "somewhere between 1 and huge". :-)
If it's configurable and documented everyone can at least tune it at will.
I'll have a look at this. Regards, Martin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
