This seems to be more of a question for an Oracle RDF or Jena ARQ (or SPARQL) forums?
In general, the issue with OPTIONAL is that it does not prune the search space. E.g. if you search for ?s ?p ?o then have a set of OPTIONAL statements after that, each OPTIONAL statement will be applied to the entire model. If you can filter or otherwise prune the search space before running the OPTIONALs, then that may help some. UNION has the same general problem. I don't know what is meant by "JOIN" in the context of SPARQL, although the algebra underlying SPARQL uses Join. One potential solution is to use a SPARQLMotion script that executes a series of queries that basically explores where the null data is found. NOT EXISTS may prove helpful here. Without a lot more detail, it would be difficult to help out much. And keep in mind that although we always try to help out with general questions on Semantic Web Technologies, questions about TopBraid Suite will be given priority. -- Scott On Sep 7, 3:10 pm, swingard <[email protected]> wrote: > I am having a problem optimizing Oracle based webservices that query > the SEM_MATCH table for exported triples. In many of my queries it > seems I have to use the OPTIONAL clause in order to return results > because of nulls in some of the data. It is impossible to determine > which columns may have nulls in it for the most part because the data > is constantly changing. So far the only way I can make the queries > run faster is to try to remove as many of the OPTIONAL clauses as > possible. Would it be faster to use JOINS or UNIONS within the > SEM_MATCH SPARQL portion of the queries somehow? Some of these > queries have over 100 OPTIONAL statements and are incredibly too slow > to be run as a webservice for an application. Any ideas of how to > optimize performance would be greatly appreciated, thanks. -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
