Thanks Dave. If we go with in-memory dataset, will I be loosing the data between jena restarts?
Thanks, Sushanth On 2020/12/03 19:13:58, Dave Reynolds <[email protected]> wrote: > Hi, > > If your data doesn't change then yes you can compute the results ahead > of time. Set up your data and reasoner, write the whole resulting model > out to a dump file. Then you can load that dump file into another TDB > and serve it as a fuseki dataset with no reasoner configuration. > > That doesn't help if your data is continuously changing though. > > The other option would be to run in-memory instead of from TDB. Given > the reasoners are intrinsically limited to data that fits in memory then > would could switch to running in memory, reading the data in from files > when fuseki starts up. That would mean start up is slow but the reasoner > performance will be a little better. > > If neither of those options work or are open to you then I'm afraid it > may simply be that the reasoner is not up to the job. > > Dave > > On 03/12/2020 17:47, Sushanth Vaddaram wrote: > > We have 6 lakh statements and when trying to hit the query with the > > configuration below, it is almost taking 90 secs to load the results. Is > > there anything I can do to improve the performance. Also is there any way > > inferencing can be done during loading of the statements rather than > > runtime as I was getting the result in 2 seconds without the reasoner in > > the configuration. > > > > Query: > > > > PREFIX dip:<http://sce.ccs.utc.com/dip/reference-ontology#> > > PREFIX map-onto:<http://sce.ccs.utc.com/dip/mapping-ontology#> > > PREFIX auth:<http://sce.ccs.utc.com/dip/semantics/authorization#> > > PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> > > PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> > > PREFIX owl: <http://www.w3.org/2002/07/owl#> > > > > SELECT DISTINCT > > ?datapointURI ?datapointTYPE ?datapointLABEL ?datapointSYSTEM > > ?datapointPROVIDER ?datapointDATAMOD ?datapointABSTPROP > > WHERE > > { > > { > > ?datapointURI rdf:type dip:DataPoint . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > ?datapointPROVIDER dip:in_system <http://dip.bis.utc.com/7#bacnet_7> . > > ?datapointURI rdf:type ?datapointTYPE . > > } > > UNION > > { > > ?datapointURI rdf:type dip:DataPoint . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > ?datapointPROVIDER dip:in_system <http://dip.bis.utc.com/7#bacnet_7> . > > ?datapointURI rdfs:label ?datapointLABEL . > > } > > UNION > > { > > ?datapointURI rdf:type dip:DataPoint . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > ?datapointPROVIDER dip:in_system <http://dip.bis.utc.com/7#bacnet_7> . > > ?datapointURI dip:data_source_url ?datapointDATAMOD . > > } > > UNION > > { > > ?datapointURI rdf:type dip:DataPoint . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > ?datapointPROVIDER dip:in_system <http://dip.bis.utc.com/7#bacnet_7> . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > ?datapointPROVIDER dip:in_system ?datapointSYSTEM . > > } > > UNION > > { > > ?datapointURI rdf:type dip:DataPoint . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > ?datapointPROVIDER dip:in_system <http://dip.bis.utc.com/7#bacnet_7> . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > } > > UNION > > { > > ?datapointURI rdf:type dip:DataPoint . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > ?datapointPROVIDER dip:in_system <http://dip.bis.utc.com/7#bacnet_7> . > > ?datapointURI dip:abstracts ?datapointABSTPROP . > > } > > { > > > > > > SELECT DISTINCT > > ?datapointURI > > WHERE > > { > > { > > ?zoneURI dip:covers > > <http://test.dip.ales/spacetest#03d78792bb3eb3086b9e4135> . > > ?zoneURI dip:has_scene_property ?zonePROP . > > ?datapointURI dip:abstracts ?zonePROP . > > ?datapointURI rdf:type dip:DataPoint . > > } > > UNION > > { > > <http://test.dip.ales/spacetest#03d78792bb3eb3086b9e4135> > > dip:spatial_containment ?deviceURI . > > ?deviceURI dip:provides_info_object ?datapointURI . > > ?datapointURI rdf:type dip:DataPoint . > > } > > UNION > > { > > ?datapointURI rdf:type dip:DataPoint . > > ?datapointPROVIDER dip:provides_info_object ?datapointURI . > > ?datapointPROVIDER dip:in_system <http://dip.bis.utc.com/7#bacnet_7> . > > <http://test.dip.ales/spacetest#03d78792bb3eb3086b9e4135> > > dip:contains_hardware / dip:contains_hardware_device ?deviceURI . > > ?deviceURI dip:provides_info_object ?datapointURI . > > ?datapointURI rdf:type dip:DataPoint . > > } > > } > > > > } > > } > > > > > > > > Configuration: > > ========== > > @prefix : <#> . > > @prefix fuseki: <http://jena.apache.org/fuseki#> . > > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > > @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . > > @prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> . > > @prefix tdb2: <http://jena.apache.org/2016/tdb#> . > > @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . > > > > [] rdf:type fuseki:Server ; > > fuseki:services ( > > <#dip> > > ) . > > > > # TDB > > #[] ja:loadClass "org.apache.jena.tdb.TDB" . > > #tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset . > > #tdb:GraphTDB rdfs:subClassOf ja:Model . > > > > ## --------------------------------------------------------------- > > > > <#dip> rdf:type fuseki:Service ; > > # URI of the dataset -- http://host:port/dip > > fuseki:name "dip" ; > > fuseki:serviceQuery "sparql" ; > > fuseki:serviceQuery "query" ; > > fuseki:serviceUpdate "update" ; > > fuseki:serviceUpload "upload" ; > > fuseki:serviceReadWriteGraphStore "data" ; > > fuseki:serviceReadGraphStore "get" ; > > fuseki:dataset <#dip_tbd> ; > > . > > > > #TBD > > <#dip_tbd> rdf:type ja:RDFDataset ; > > ja:defaultGraph <#infModel> ; > > tdb:fileMode "direct" ; > > . > > > > <#infModel> a ja:InfModel ; > > ja:baseModel <#tdbGraph>; > > ja:reasoner > > [ja:reasonerURL > > <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner>]. > > > > <#tdbGraph> rdf:type tdb2:GraphTDB ; > > tdb2:location "C:\\etc\\fuseki/databases/dip5" ; > > tdb2:unionDefaultGraph true ; > > > > . > > > > > > Thanks for the help!!! > > >
