I believe that the first query with the "from" will make a network call and add what is returned to to default graph while the second one will query the data already loaded in the named graph. If I'm correct that would explain the difference and wouldn't be surprised to see the results you're getting.
https://jena.apache.org/tutorials/sparql_datasets.html On Thu, Mar 7, 2019 at 11:56 AM Jean-Claude Moissinac <[email protected]> wrote: > Hello > > I'm using jena-fuseki 3.6.0 > I've tried two queries which, for me seems equivalent: > select (count(distinct ?s) as ?c) > from <http://givingsense.eu/datamusee/onto/contextgraph18022019> > where { > ?s a ?t; > a <http://dbpedia.org/ontology/Painter> > } > and > select (count(distinct ?s) as ?c) > where { > graph <http://givingsense.eu/datamusee/onto/contextgraph18022019> { > ?s a ?t; > a <http://dbpedia.org/ontology/Painter> > } > } > > The second is much muck quickest than the first; for example, 42712 ms for > the first one and 524 ms for the second > It's a penalty because I would like sometimes to use several graphs and the > from version seems to be the good way. > > Any advices or comments? > -- > Jean-Claude Moissinac >
