1 Reply Latest reply on Dec 20, 2007 5:51 PM by Mannamal-Oracle

    SEM_MATCH performance

    609674
      Hi Melli,

      Excuse me,I also had the question to have to ask you.
      I used the SEM_MATCH table funcation to Query Semantic Data, like the following:

      select a from TABLE
      (SEM_MATCH( '(?a rdf:type :Chair)',
      SEM_Models('model_name'),null,
      SEM_Aliases(SEM_Alias('rdf','http://www.w3.org/1999/02/22-rdf-syntax-ns#'),
      SEM_Alias('', 'alias')),
      null))
      where a = 'http://aa.bb.cc.dd.ee/ff/gg#C000015'

      It took about 40 seconds to get the result. But when I changed "Chair" to "Desk", then it only need 0.5 second. I want to know why like this?


      And then,I used the tool PL/SQL Developer's Explain Plan Window to analyzing the SQL. I saw the "table access full" on rdf_link$ and three nested loops.

      So,would you please let me know the reason?


      Steven
      Dec,14 2007
      Thanks.
        • 1. Re: SEM_MATCH performance
          Mannamal-Oracle
          Hi Steven,

          Does your data have a lot of triples with the value ':Chair'? That might be one reason why the query execution involved a full table scan.

          Or the query optimizer might not have picked the right plan. Have you generated statistics (using sem_perf.gather_stats?)

          If you have generated statistics and the query optimizer still did not pick the right plan, then probably some hints have to be used. We are in the process of documenting some such hints that can be passed in as part of the query. Once that is available I will post a link on this forum.

          Melli