Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why is my SPARQL query so slow when I use property restrictions?

user8897213Dec 11 2014 — edited Jan 14 2015

This is my query:

PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>

PREFIX rdl:    <http://data.aibel.com/rdl/>

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

PREFIX owl:   <http://www.w3.org/2002/07/owl#>

PREFIX ORACLE_SEM_HT_NS: <http://oracle.com/semtech#GET_EXACT_VALUES>

PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#timeout=50,qid=123>

select ?annulus ?annulusLabel ?od ?wt {

  ?annulus a owl:Class ; rdfs:label ?annulusLabel ;

    rdfs:subClassOf/rdfs:subClassOf rdl:X101001915 ; # Circular Cross Section Object

    rdfs:subClassOf [ a owl:Restriction ; owl:onProperty rdl:X101001912 ; # Specified Outside Diameter_mm

      owl:hasValue ?od ] ;

    rdfs:subClassOf [ a owl:Restriction ; owl:onProperty rdl:X101001913 ; # Specified Wall Thickness_mm

      owl:hasValue ?wt ] .

}

limit 100

I tried exactly the same query in the Protégé SPARQL tab, with 27000 classes loaded. I get the desired list of results immediately, as soon as I click "Execute". Removing the "limit 100" directive makes Protégé return more results, within about two seconds.

On my Oracle joseki enpoint is times out. How can I awoid the full table scan on  MDSYS.RDF_LINK$ ?

Thanks

Per Øyvind

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2015
Added on Dec 11 2014
2 comments
1,509 views