On 06/11/2014 18:57, Claus Ibsen wrote:
So maybe its your maxRows=1000 that is the problem, so when you are
trying to get rows > 1000 then it throws that exception.

What is your use case? You want to select * from a table, but only the
first 1000 rows?
No, it happens without maxRows. I was just experimenting with maxRows to confirm that the statement.XXX bit was working. My use case is to select all rows from a very large table and process them one by one. e.g. something like this:

from('direct:databasequery')
.to('jdbc:myDataSource?outputType=StreamList&statement.fetchSize=100')
.split(body()).streaming()
.log('Processing row')


Without fetchSize Postgresql tries to load the whole table into memory so it blows up with OOM exception.
With fetchSize in plain Java it works fine.
With fetchSize plus Camel it seems to blow up with that wierd Postgresql exception.

Tim

Reply via email to