2 Replies Latest reply on Sep 23, 2009 5:01 AM by 712796

    SEM_MATCH queries performance issues

    712796
      Hello,

      We are running into performance issues when using SEM_MATCH queries.

      We have a model for the data (ABox) containing 12,000,000 triples.
      We have a model for the scheme (TBox) containing 800 triples.
      We ran an "OWLprime" entailment and built the model and entailment indexes using SEM_APIS commands.

      The number of triples after executing entailment was 35,000,000 triples.

      We are using the following hardware configuration:
      OS: Windows Server 2008
      CPU: Intel Xeon CPU X5460 @3.15 GHz (2 processors).
      64bit operation system.
      Memory: 32GB

      From the results below, it seems that whenever we are executing a query on the inference index, execution time is increasing dramatically.

      Here are the results:


      1. Single pattern query using inference index:
      SELECT

      x
      FROM TABLE(
      SEM_MATCH( '(?x <http://www.we.com/weo.owl#has_symptom> < http://www.we.com/weo.owl #allergyA>)' ,
      SEM_Models ('TOM_ONTOLOGY','TOM_ONTOLOGY_TA'),

      SDO_RDF_RULEBASES('OWLPrime'), NULL,NULL,NULL)
      +);+
      Execution time: 0.02 seconds

      2.
      a.Double pattern query using inference index:
      SELECT

      x,y
      FROM TABLE(
      SEM_MATCH( '(?x <http://www.we.com/weo.owl#has_symptom> < http://www.we.com/weo.owl #allergyA>)

      +(?x rdf:type <http://www.we.com/weo.owl#patient>)+

      +(?x <http://www.we.com/weo.owl#id> ?y)' ,+
      SEM_Models ('TOM_ONTOLOGY','TOM_ONTOLOGY_TA'),

      SDO_RDF_RULEBASES('OWLPrime'), NULL,NULL,NULL)
      +);+
      Execution time: 127 seconds

      b. Double pattern query without using inference index:
      SELECT

      x,y
      FROM TABLE(
      SEM_MATCH( '(?x <http://www.we.com/weo.owl#has_symptom> < http://www.we.com/weo.owl #allergyA>)

      +(?x rdf:type <http://www.we.com/weo.owl#patient>)+

      +(?x <http://www.we.com/weo.owl#id> ?y)' ,+
      SEM_Models ('TOM_ONTOLOGY','TOM_ONTOLOGY_TA'),

      NULL, NULL,NULL,NULL)
      +);+
      Execution time: 2.5 seconds


      3.
      a. Triple pattern query using inference index:
      SELECT
      x,y,z
      FROM TABLE(
      SEM_MATCH( '(?x <http://www.we.com/weo.owl#has_symptom> < http://www.we.com/weo.owl #allergyA>)
      (?x rdf:type <http://www.we.com/weo.owl#patient>)
      (?x <http://www.we.com/weo.owl#id> ?y)
      (?x < http://www.we.com/weo.owl#gender> ?z)' ,
      SEM_Models ('TOM_ONTOLOGY','TOM_ONTOLOGY_TA'),
      SDO_RDF_RULEBASES('OWLPrime'), NULL,NULL,NULL)
      );

      Execution time: 146 seconds
      b. Triple pattern query without using inference index:
      SELECT
      x,y,z
      FROM TABLE(
      SEM_MATCH( '(?x <http://www.we.com/weo.owl#has_symptom> < http://www.we.com/weo.owl #allergyA>)
      (?x rdf:type <http://www.we.com/weo.owl#patient>)
      (?x <http://www.we.com/weo.owl#id> ?y)
      (?x < http://www.we.com/weo.owl#gender> ?z)' ,
      SEM_Models ('TOM_ONTOLOGY','TOM_ONTOLOGY_TA'),
      NULL, NULL,NULL,NULL)
      );

      Execution time: 9 seconds

      Thanks,

      Doron