Hi Florian,

Can you please provide the compilation and query execution plan for this query 
using the Virtuoso explain() function as detailed at:

        http://docs.openlinksw.com/virtuoso/fn_explain.html

Note you will need to run this function from the Virtuoso "isql" command line 
program or the "Interactive SQL" interface  of the conductor (not the sparql 
one) remembering to prepend your query with the "sparql ..." keyword specifier.

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
Twitter: http://twitter.com/OpenLink

On 10 Sep 2010, at 13:13, Florian Kleedorfer wrote:

> Hi, 
> 
> I'm having problems with a SPARQL query I need to run on virtuoso.  The 
> sparql engine returns this error message (with a simplified version of my 
> query):
> 
> 37000 Error SP031: SPARQL compiler: Internal error: The SPARQL optimizer has 
> failed to process the query with reasonable quality. The resulting SQL query 
> is abnormally long. Please paraphrase the SPARQL query.
> 
> SPARQL query:
> PREFIX owl: 
> PREFIX sc:  
> PREFIX common: 
> PREFIX config: 
> PREFIX xsd:
> select *
> FROM config:
> where { 
>   ?g1 common:useGraph "true"^^xsd:boolean
>   . ?type common:resultForContext ?ctx
>   . GRAPH ?g1 {
>     ?ind a ?type 
>     . OPTIONAL {
>        ?ind ?correctLangProp ?correctLangVal
>        . filter(langMatches(lang(?correctLangVal),"en"))
>     } 
>   } 
> } limit 10
> 
> 
> The idea is to have a named graph (config: in this query) that contains the 
> names of graphs which in turn contain the data I want to work on. This works 
> fine unless I use optional graph patterns to select from a graph IRI found in 
> the config: graph (?g1 in this query). I tried different reformulations of 
> the query, but I had no luck. 
> 
> Any ideas, anyone? - Thanks!
> 
> Best,
> Florian
> 
> ------------------------------------------------------------------------------
> Automate Storage Tiering Simply
> Optimize IT performance and efficiency through flexible, powerful, 
> automated storage tiering capabilities. View this brief to learn how
> you can reduce costs and improve performance. 
> http://p.sf.net/sfu/dell-sfdev2dev_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Reply via email to