Hi,

I reorganized my query as you say, using "one of filter" (FILTER IN)
method. The query, that I send my local drugbank endpoint contains 4348
element in its filter block. I have tried several scenarios as configuring
the element count in filter block. When element count in filter block is
bigger than 510, I receive "HTTP 500: SPARQL request failed, Transaction
timeout" error. I tried already increasing MaxQueryExecutionTime parameter
into 600 seconds, I received the same error again. So I tried this query on
"http://lod.openlinksw.com/sparql"; endpoint, which already contains
drugbank dump. Because I think the problem may caused by that the computer
power, that I use is not enough to respond this big filter block. When I
send query greater than 4094 FILTER block to the "
http://lod.openlinksw.com/sparql";, I receive "HTTP 400: Too many arguments
of a standart built-in function operator".
I shared the query consist of 4096 filter count at this link:
https://docs.google.com/file/d/0B3zcaLjQc0_yV2c2UjBMV2lZUlE/edit
So If you want to try and see the error, you can execute the query directly
on "http://lod.openlinksw.com/sparql";. If you remove 2 elements from filter
block you will get the results.
Is there any way to increase element count, which will be enough to execute
query with filter block consisting of 4348 elements. Does Virtuoso contains
any parameter realted to this element count in filter.

Best,

Burak Yönyül

2012/12/17 Patrick van Kleef <pkl...@openlinksw.com>

> Hello Burak Yönyül,
>
>
> > I cannot execute queries which are greater than a few kilobytes on
> Virtuoso. I've loaded example drugbank dataset into Virtuoso Opensource 6.1
> and I'm trying to execute the query in the file I've attached here, on my
> local drugbank dataset with the sparql endpoint "
> http://155.223.24.47:8893/drugbank/sparql";. But when I execute this I get
> "HTTPException: 400 Bad Request". How can I execute queries greater than 25
> KB?
>
> I promised i would also have a look at the query itself and see if it
> could be simplified.
>
> Your query consists of a union of repeating patterns like this:
>
> { ?y_0 <http://www.w3.org/2002/07/owl#sameAs> <
> http://dbpedia.org/resource/Tetrahydrocannabinol> .
> ?Int_0 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug1>
> ?y_0 .
> ?Int_0 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug2>
> ?IntDrug_0 .
> ?Int_0 <http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/text>
> ?IntEffect_0
> }
> UNION
> { ?y_1 <http://www.w3.org/2002/07/owl#sameAs> <
> http://dbpedia.org/resource/Mescaline> .
> ?Int_1 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug1>
> ?y_1 .
> ?Int_1 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug2>
> ?IntDrug_1 .
> ?Int_1 <http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/text>
> ?IntEffect_1
> }
> }
> UNION
> { ?y_2 <http://www.w3.org/2002/07/owl#sameAs> <
> http://dbpedia.org/resource/Bacillus_Calmette-Gu%C3%A9rin> .
> ?Int_2 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug1>
> ?y_2 .
> ?Int_2 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug2>
> ?IntDrug_2 .
> ?Int_2 <http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/text>
> ?IntEffect_2
> }
> }
> UNION
> { ?y_3 <http://www.w3.org/2002/07/owl#sameAs> <
> http://dbpedia.org/resource/Sugammadex> .
> ?Int_3 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug1>
> ?y_3 .
> ?Int_3 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug2>
> ?IntDrug_3 .
> ?Int_3 <http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/text>
> ?IntEffect_3
> }
> }
> UNION
> { ?y_4 <http://www.w3.org/2002/07/owl#sameAs> <
> http://dbpedia.org/resource/Carnitine> .
> ?Int_4 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug1>
> ?y_4 .
> ?Int_4 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug2>
> ?IntDrug_4 .
> ?Int_4 <http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/text>
> ?IntEffect_4
> }
> }
>
> etc.
>
> In this case you should be able to use the SPARQL 1.1 IN construction[1]
> as in:
>
> SELECT * WHERE {
>   ?y_0 <http://www.w3.org/2002/07/owl#sameAs> ?d_1 .
>   FILTER (?d_1 in (
>         <http://dbpedia.org/resource/Tetrahydrocannabinol> ,
>         <http://dbpedia.org/resource/Mescaline>,
>         <http://dbpedia.org/resource/Bacillus_Calmette-Gu%C3%A9rin>,
>         <http://dbpedia.org/resource/Sugammadex>,
>         <http://dbpedia.org/resource/Carnitine>
>   )).
>
>   ?Int_0 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug1>
> ?y_0 .
>   ?Int_0 <
> http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/interactionDrug2>
> ?IntDrug_0 .
>   ?Int_0 <http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/text>
> ?IntEffect_0
> }
>
> which results in a much shorter query.
>
> See also:
> [1] http://www.w3.org/TR/sparql11-query/#func-in
>
>
> Best regards,
>
> Patrick
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to