RDFS and OWL support optimisationsΒΆ

There are several features in the RDFS and OWL specifications that lead to inefficient entailment rules and axioms, which can have a significant impact on the performance of the inferencer. For example:

  • The consequence X rdf:type rdfs:Resource for each URI node in the RDF graph;
  • The system should be able to infer that URIs are classes and properties, if they appear in schema-defining statements such as Xrdfs:subClassOf Y and X rdfs:subPropertyOf Y;
  • The individual equality property in OWL is reflexive, i.e., the statement X owl:sameAs X holds for every OWL individual;
  • All OWL classes are subclasses of owl:Thing and for all individuals X rdf:type owl:Thing should hold;
  • C is inferred as being rdfs:Class whenever an instance of the class is defined: I rdf:type C.

Although the above inferences are important for formal semantics completeness, users rarely execute queries that seek such statements. Moreover, these inferences generate so many inferred statements that performance and scalability can be significantly degraded.

For this reason, optimised versions of the standard rulesets are provided. These have -optimized appended to the ruleset name, e.g., owl-horst-optimized.

The following optimisations are enacted in GraphDB:

Optimisation Affects patterns
Remove axiomatic triples
  • <any> <any> <rdfs:Resource>
  • <rdfs:Resource> <any> <any>
  • <any> <rdfs:domain> <rdf:Property>
  • <any> <rdfs:range> <rdf:Property>
  • <owl:sameAs> <rdf:type> <owl:SymmetricProperty>
  • <owl:sameAs> <rdf:type> <owl:TransitiveProperty>
Remove rule conclusions
  • <any> <any> <rdfs:Resource>
Remove rule constraints
  • [Constraint <variable> != <rdfs:Resource>]