On Thu, Aug 22, 2013 at 3:38 PM, Phil Ashworth <[email protected]> wrote:
> Hi Guys Sorry for asking one last dumb question
>
> Is ParameterizedSparqlString the preferred way to do variable bindings in
> all scenarios?
>
> I ask because I'm not sure if there are performance gains to be had using
> the query.setValuesDataBlock or QueryExecutionFactory.create(query, dataset,
> initialBinding) methods when the query is not going against a sparql
> service.

I can't speak as to which will have better performance characteristics
(and of course, that depends on what you mean by performance, too;
speed?  memory usage?  something else?), and this is probably a
question best answered by some tests and profiling.  I wanted to point
out though, since you seem to be considering
ParameterizedSparqlStrings for local and remote queries, and
programmatically constructed Queries and initialBindings for remote
queries only, that both ParameterizedSparqlStrings and the
programmatically constructed queries should work in both local and
remote situations.  All three can be used locally, but the
initialBinding approach cannot be used for remote queries.

//JT
-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to