It's a difference in processing semantics While a SELECT produces a table of results which is amenable to streaming a CONSTRUCT produces a RDF graph which is a set and thus requires structures to be held in memory while the model is being built in order to suppress duplicates as required by RDF semantics.
Note that internally there are methods that will produce streaming results from CONSTRUCT queries but the trade off is that duplicate triples are not suppressed in this case. It is likely possible to modify tdbquery to do this, patches are always welcome Rob On 5/30/13 8:03 AM, "Mark Atkinson" <[email protected]> wrote: >Using: Jena 2.10.0 >For a large dataset (~170 million triples) >tdbquery heap size: (Default) 1024M > >The following query streams the result to standard out immediately > >tdbquery --results=TSV -loc=xyz "select * where {?s ?p ?o}" > >The 'equivalent' CONSTRUCT query fills up the heap, no results are written >to standard out. > >tdbquery --results=n3 -loc=xyz "construct {?s ?p ?o} where {?s ?p ?o}" > >Any thoughts as to why the construct query cannot return results >immediately to standard out similarly to the select would be great.
