Hi everybody.

I am trying to execute the query

PREFIX void: <http://rdfs.org/ns/void#>
PREFIX dv: <http://bio2rdf.org/bio2rdf.dataset_vocabulary:>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX drugbank: <http://bio2rdf.org/drugbank_vocabulary:>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT ?drug
       ?drugTitle
       ?brandTitle
WHERE {
 ?drug a drugbank:Drug .
 OPTIONAL { ?drug dcterms:title ?drugTitle .
            ?drugTitle bif:contains "'Ibuprofen'"} .
 OPTIONAL { ?drug drugbank:brand ?brand .
            ?brand bif:contains "'Ibuprofen'"} .
 OPTIONAL { ?brand dcterms:title ?brandTitle .
            ?brandTitle bif:contains "'Ibuprofen'"} .
}

which uses bif:contains inside optionals.

I get the error:

Virtuoso 37000 Error SQ156: Internal Optimized compiler error :
supposed to have ose in bracket outer in rdfinf.c:2636.
Please report the statement compiled.

SPARQL query:

#output-format:text/html
PREFIX void:
PREFIX dv:
PREFIX dcterms:
PREFIX drugbank:
PREFIX rdf:

SELECT ?drug
       ?drugTitle
       ?brandTitle
WHERE {
 ?drug a drugbank:Drug .
 OPTIONAL { ?drug dcterms:title ?drugTitle .
            ?drugTitle bif:contains "'Ibuprofen'"} .
 OPTIONAL { ?drug drugbank:brand ?brand .
            ?brand bif:contains "'Ibuprofen'"} .
 OPTIONAL { ?brand dcterms:title ?brandTitle .
            ?brandTitle bif:contains "'Ibuprofen'"} .
}

Is this an invalid query? I tried the same query with only the first
optional clause in place and I don't get the error, but I don't get any
results either. It seems it takes too long to execute (more than 10
minutes).

Could you please point me on how I could use such a restriction with
multiple optional clauses in a performance suitable manner?

Kind regards,
Pantelis Natsiavas
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to