Hi Barry, Thanks for this! Changing the queries as you suggested made all the difference to query time. The queries finished on a repository with 4.7 million statements in approximately 20 seconds.
Alison On Mon, Feb 20, 2012 at 6:56 AM, Barry Bishop <[email protected]>wrote: > Hello Alison, > > The getting started application is very inefficient with regard to > counting explicit and implicit statements. It is really more of a > demonstrator for how to tuse the Sesame APIs. > > I suggest something along these lines for achieving what you require: > > SELECT ( COUNT(*) AS ?count ) > { ?s ?p ?o . } > => Total number of unique countable statements (merge of the default graph > and all named graphs) > > ^[explicit] > SELECT ( COUNT(*) AS ?count ) > FROM <http://www.ontotext.com/explicit> <http://www.ontotext.com/explicit> > { ?s ?p ?o . } > => Number of explicit statements in the default graph > > ^[implicit] > SELECT ( COUNT(*) AS ?count ) > FROM <http://www.ontotext.com/implicit> <http://www.ontotext.com/implicit> > { ?s ?p ?o . } > => Number of implicit statements in the default graph > > If you wish to count statements in named graphs as well, then you will > need to modify along these lines: > > SELECT ( COUNT(*) AS ?count ) > { GRAPH ?g { ?s ?p ?o . } } > => Number of statements in all named graphs (but not the default graph). > By definition, these statements must be explicit, because it is not > possible to have inferred statements in a default graph. > > I hope this helps, > barry > > > Barry Bishop > OWLIM Product Manager > Ontotext AD > Tel: +43 650 2000 237 > email: [email protected] > > > On 19/02/12 21:18, Alison Callahan wrote: > > Hello all, > > I have installed OWLIM-SE version 4.3.4328 on a machine with 24 GB of > RAM, running Ubuntu 11.10 64-bit. I assigned Tomcat 20 GB of RAM. I created > an OWLIM-SE repository using the Worbench online form, with the following > parameters: > > entity index size: 20000000 > total cache memory: 16384 MB > main index memory: 14336 MB > > and all other parameters set to their default values. > > I am able to load data with no issues (11 TTL files ranging in size from > 1MB to 350 MB), but querying the repository to get the number of explicit > and implicit statements using the methods in GettingStarted.java > (distributed with the installation) is *extremely* slow (i.e. doesn't > finish after 4+ hours). Also, Tomcat never uses more than 4 GB of RAM. > > Is there any way I can improve query time with the resources I have > available? Thanks, > > Alison > > > _______________________________________________ > Owlim-discussion mailing > [email protected]http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion > >
_______________________________________________ Owlim-discussion mailing list [email protected] http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion
