Hello Florian, It compiles adequately for me on a blank database, and the message is very typical for RDF storages with big number of RDF Views and queries that tries to access all of them at once. To reproduce the case I should know the .ini file, the database schema (at least all tables used in views and their indexes) and the script(s) used to create all RDF Views of the storage.
Best Regards, Ivan Mikhailov OpenLink Software http://virtuoso.openlinksw.com P.S. It looks like your mail client strips fragments of texts that resemble HTML tags, like <namespace-iri> s after PREFIX owl: , PREFIX sc: and so on, so please attach scripts, not paste inline. On Fri, 2010-09-10 at 14:13 +0200, 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