Re: SPARQL Query over subset of graphs in TDB

2021-04-12 Thread Andy Seaborne
On 12/04/2021 09:33, Siddharth Trikha wrote: Or create a second general dataset, then get the named graph objects (they are reference) and put it in this dataset and query that. (this is what using several FROM NAMED does anyway) If I understand it correctly the following example is what

Re: SPARQL Query over subset of graphs in TDB

2021-04-12 Thread Siddharth Trikha
> > Or create a second general dataset, then get the named graph objects > (they are reference) and put it in this dataset and query that. > > (this is what using several FROM NAMED does anyway) > If I understand it correctly the following example is what you suggested: Dataset createGeneral = Da

Re: SPARQL Query over subset of graphs in TDB

2021-04-09 Thread Andy Seaborne
On 09/04/2021 10:05, Lorenz Buehmann wrote: You are using TDB which is an external database and indexes to the data which resides on disk. Why do you think that all the graphs are loaded into memory? Why can't you modify the given query in your code? You can either do string hacks, or what

Re: SPARQL Query over subset of graphs in TDB

2021-04-09 Thread Lorenz Buehmann
You are using TDB which is an external database and indexes to the data which resides on disk. Why do you think that all the graphs are loaded into memory? Why can't you modify the given query in your code? You can either do string hacks, or what I'd prefer, parse the query and work on the que

SPARQL Query over subset of graphs in TDB

2021-04-09 Thread Siddharth Trikha
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(*) A