Hi Paolo,

thanks for your reply. I've already tried your rewritten query, but it does not terminate, too. I really do not know why is that - hopefully someone can give me a useful hint!

Thorben

Am 24.10.2011 18:51, schrieb Paolo Castagna:
Hi Thorben
I am sorry, I do not have the answer to your question.
I have a question and a couple of comments I wanted to share with you.

Thorben Wallmeyer wrote:
Am 24.10.2011 18:11, schrieb Thorben Wallmeyer:
Hi,

I've got an OntModel with OnModelSpec.OWL_MEM_RULE_INF set that contains about 25.000 statements and only 1(!) transitive property. Now I'm trying to list all Statements with a special subject (http://myResource) by calling

StmtIterator iter = model.listStatements(model.createResource("http://myResource";), null, (RDFNode) null);

Although execution of this method does not take a long time (some seconds) I run in serious trouble/performance issue when calling

iter.hasNext();

This call does not terminate within 5 minutes and I'm asking myself if what's wrong. Therefore I'm looking for better solution and your suggestions... ;-)


Best,

Thorben


Some problem with:

String query = "SELECT ?s ?p ?o WHERE {?s ?p ?o. FILTER(?s =<METEX://knowledge/infection> ).}"; QueryExecution qexec= QueryExecutionFactory.create(query, tmpModel);
        ResultSet rs = qexec.execSelect();

Are you running this query over the same OntModel?

This is also an equivalent query:

SELECT * WHERE { <METEX://knowledge/infection> ?p ?o . }

But, if you are using the same OntModel, I do not expect
is going to make any difference.

Is there a way or need to explicitly define a customized index?

Interesting question... :-)

An example of this is LARQ = Lucene + ARQ.
LARQ uses Lucene (i.e. a separate index) to answer free text queries.

Documentation is here:
http://incubator.apache.org/jena/documentation/larq/

Sources are here:
http://svn.apache.org/repos/asf/incubator/jena/Jena2/LARQ/trunk/

But, I would not rush to try doing something better with a customized
index, before understand what's going on and why your initial attempt
is slow.

Another option you might look at is:
http://openjena.org/wiki/RIOT#Inference

Paolo



Thorben




Reply via email to