Thanks for the pointers to the excellent tutorial materials on how SPARQL queries are processed and how various things affect performance.After a little bit of digging and experimenting with ARQ, I’m not clear on how things go from an optimized SPARQL algebra expression to evaluation of leaf BGPs and when/where indexes are created and used.

I assumed ARQ uses the Graph interface to access an underlying Model, which can be backed by any of an in-memory model, a TDB, my own class that implements the Graph interface, or an inference or union model backed by any of these.The Graph interface does not have a “find” method that accepts a multi-triple BGP as an input (as one of the tutorials described), just finds for single-triple patterns.

QueryExecutionFactory lets me create a query on either a Model or a Dataset.What is the difference?Which one does ARQ actually operate on?Will ARQ create a Dataset and DataGraph if given (say) an in-memory Model to be queried?Graph, Dataset, and DatasetGraph all support only single-triple query patterns.The TDB documentation talks about optimizing the SPARQL algebra, but it is the ARQ API that has optimization configuration options.Some initial experiments with a couple of ARQ Context settings resulted in little impact on a test query issued to a series of increasingly larger in-memory models.When/where are indexes created and used?

Thanks for any insight.

On 3/18/2021 9:45 AM, Steve Vestal wrote:
Thanks. I'm looking to get smarter in general about formulating queries, particularly those with non-trivial graph structure, e.g., more than just a shallow tree of properties rooted in one resource, maybe dags, maybe with cycles.  I am open to post-processing query

results.  (I do that already, generating and post-processing queries are steps in the overall algorithm.)

On 3/18/2021 9:19 AM, Andy Seaborne wrote:


On 17/03/2021 22:45, Steve Vestal wrote:
I'd like to dig a bit deeper into SPARQL query performance, better understand how different query formulations affect that, how ARQ configuration parameters might be used to tune that.  Can anyone

recommend a place to start reading beyond the SPARQL book and language definition?

Hi Steve,

It's a bit "it depends on the query.

There was a presentation recently  and while its not about ARQ, the fundamental point that getting the basic graph pattern matching working efficiently applies.

http://www.lotico.com/index.php/SPARQL_Query_Optimization_with_Pavel_Klinov

Do you have specific queries in mind or is this a general enquiry?

    Andy

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to