Using the attached configuration, the URI:
http://localhost/transport/doc/nptg-district/059
ends up with a timeout error. Looking at the query, the problem is with the
SPARQL that gets
generated, which looks like:
construct
{
...
<http://transport.data.gov.uk/id/nptg-district/059>
<http://transport.data.gov.uk/def/naptan/nptgLocality> ?v_6 .
?v_6 <http://www.w3.org/2004/02/skos/core#prefLabel> ?v_7 .
}
where
{
...
OPTIONAL{ <http://transport.data.gov.uk/id/nptg-district/059>
<http://transport.data.gov.uk/def/naptan/nptgLocality> ?v_6 . }
OPTIONAL{ ?v_6 <http://www.w3.org/2004/02/skos/core#prefLabel> ?v_7 . }
}
The district itself doesn't have a nptgLocality property, but there are lots of
things that have a
prefLabel, and that get selected due to the second OPTIONAL statement above.
This causes the
timeout.
To make sure it doesn't happen, the second OPTIONAL should be nested within the
first:
OPTIONAL{
<http://transport.data.gov.uk/id/nptg-district/059>
<http://transport.data.gov.uk/def/naptan/nptgLocality> ?v_6 .
OPTIONAL{ ?v_6 <http://www.w3.org/2004/02/skos/core#prefLabel> ?v_7 . }
}
The same is true for any property chain.
Original issue reported on code.google.com by jeni.ten...@gmail.com on 31 May 2010 at 8:19
Original issue reported on code.google.com by
jeni.ten...@gmail.com
on 31 May 2010 at 8:19Attachments: