On 27/08/12 18:58, Damian Steer wrote:

On 27 Aug 2012, at 18:51, Stephen Allen <[email protected]> wrote:

Would it be possible to use a buffer? For small-ish result sets you would get 
the behaviour Andy suggests, but avoid the OOM issue.


Something like setFetchSize() [1]?  Oracle [2] defaults to 10 rows,
while PostgreSQL [3] and MySQL [4] both buffer the entire result.

Yep. In SDB we've tripped over the default behaviour of MySQL many times.

Damian


OK - so streaming seems popular :-)

There is some buffering anyway and it can be increased.

The main source is the processing the input stream:

CONSTRUCT/DESCRIBE -> these do a model.read so when RIOT gets swapped into Jena proper, there is a 128K peek reader buffer.

SELECT -> calls ResultSetFactory.fromXYZ - these would need to be checked.

but I think a buffered ResultSet would be a better solution, maybe not in this code but as a ResultFactory operation c.f. ResultFactory.copyResults.

((
QueryEngineHTTP is quite old code and it, and HttpQuery, could do with some maintainece and upgrade. Using Apache HttpClient for example (SPARQL Update already does via HttpOp). + Service code.
))

        Andy

Reply via email to