Hi all,

I have a use case to run a SPARQL query over a limited set of Graphs in my
TripleStore.

For example:

 String directory = "MyDatabases/DB1" ;
    Dataset dataset = TDBFactory.createDataset(directory) ;

    // Potentially expensive query.
    String sparqlQueryString = "SELECT (count(*) AS ?count) { ?s ?p ?o }" ;

    Query query = QueryFactory.create(sparqlQueryString) ;
    QueryExecution qexec = QueryExecutionFactory.create(query, dataset) ;
// ...............

The above example would run on the whole Database.

I want to run the above SPARQL Query over lets say just 5 named GRAPHS
whose names I know.

The sparqlQueryString will be provided by the application as given
above without named GRAPHS specified inside the Query String, but
passes the Graph names (IRIs) in another attribute separately.

I wanted to avoid in-memory loading of all named GRAPHS as this number
can increase.

Is there an efficient way of achieving this use case ?

Any help is appreciated.


-- 
Regards
Siddharth Trikha
Reserach Engineer at C-DOT (Center for Development of Telematics)
9958954669

Reply via email to