On 02/11/12 16:27, Elli Schwarz wrote:
Hello,


I'm using a build of Fuseki from the trunk (revision 1404554) and I'm
having the following problem.

After running this:

insert data {    graph <http://192.168.6.37/graph/test> {       <x:s>
<x:p> "FOO"    }}

I verify that the following select query works (I have the option
tdb:unionDefaultGraph set to true) : select *  where {  ?s ?p "FOO"}


However, the following Update script does not result in any data
added into <http://192.168.6.37/graph/new> insert {    graph
<http://192.168.6.37/graph/new> {          ?s ?p "NEW"    }
} where {         ?s ?p "FOO" }


If, however, I use a USING (or wrap the query pattern in a GRAPH)
this works properly, adding the data to
<http://192.168.6.37/graph/new>:

insert {    graph <http://192.168.6.37/graph/new> {          ?s ?p
"NEW"    }         } using <http://192.168.6.37/graph/test> where {
?s ?p "FOO" }


Since I have tdb:unionDefaultGraph set to true, I would expect both
INSERTs to behave the same way. In my application (which has a much
more complicated query than the above minimal example), I want the
WHERE clause to query against a union of all named graphs but I still
want to be able to insert into one named graph (I obviously can't
insert into the read-only union). Is the behavior I'm seeing a bug?

Could you try the following:

INSERT { GRAPH <http://192.168.6.37/graph/new> { ?s ?p ?o "NEW" } }
WHERE { GRAPH <urn:x-arq:UnionGraph> { ?s ?p "FOO" } }

which uses the named union.  Does that work?

As a workaround to the above problem, I could use USING (although it
would be tedious to always list all named graphs). However, when I
specify the USINGs as above in my application, Fuseki doesn't
complete, it just keeps on going (I stopped it after a half hour).

I'm not sure I understand the setup here - a complete minimal example would be useful.

        Andy

This is true despite the fact that if I take the WHERE clause from
the INSERT query and put it in a select query (using FROM instead of
USING), it returns rather quickly. Unfortunately, it is hard for me
to give you a complete minimal example of this problem since my data
and query are proprietary, but it doesn't make sense to me that
adding a USING to the INSERT script should make the query take such a
long time. I only have 1.5 million triples total in my triple store,
and the named graphs I specify in the USING contain about 150k
triples, so I would expect it to run faster with USING! If anyone has
any ideas as to the solution to this problem also, please let me
know.


I tested the first problem in the Fuseki 0.2.4 release, and had the
same problem. However, I didn't have the second problem in 0.2.4
(adding the USING doesn't make the query take too long in that
version), so something must have changed in later versions to cause
this problem.


Thank you for your help!

-Elli




Thank you, Elli



Reply via email to