1 Reply Latest reply on Aug 7, 2008 8:44 PM by alwu-Oracle

    Jena Driver repeating "Final Clause"

    652134
      I am using the Jena Adaptor to query some data out of my models. My current SPARQL query retrieves data from 2 models: gene and homologene. I am executing my query within NetBeans. During the query execution, Netbeans shows some output from Oracle as it translates my SPARQL query into a series of 'SELECT...FROM table(sdo_rdf_match...' statements. I am joining data from 2-3 models in most of my queries. All of my other queries run fine (they generate 2-3 'SELECT...FROM table(sdo_rdf_match...' statements and return the data quickly). This SPARQL query is generating the following statements:

      INFO [main] (SimpleLog.java:47) - Final clause = SELECT...FROM table(sdo_rdf_match...sdo_rdf_models('GENE')...
      INFO [main] (SimpleLog.java:47) - Final clause = SELECT...FROM table(sdo_rdf_match...sdo_rdf_models('HOMOLOGENE')...

      The second type of statement (where the data is returned from the HOMOLOGENE model) is repeated over 100 times. It looks like the statement is repeated for each match from the HOMOLOGENE model. Here is my SPARQL query:

      "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> " +
      "SELECT ?gene ?article_gene " +
      "WHERE " +
      "{ " +
      " GRAPH <http://gene> " +
      "{ ?gene rdfs:label ?genename } " +
      "GRAPH <http://homologene> " +
      "{ ?homologous_gene_record <has_homologous_gene_record> ?article_gene . " +
      " ?homologous_gene_record <has_homologous_gene_record> ?gene } " +
      "} LIMIT 50";

      Can I do something to speed up the execution of this query? Is there something about my SPARQL query? I am currently limiting my data to return 50 items. I really want to get all the data back.
      Thanks,
      Chuck