Dear all,

I have a dataset with (among other things) about 400,000 triples in the form

?a adm:logDate ?d

where ?d is an xsd:dateTime. I'm writing a query to get all the
triples that have a ?d in a certain interval. There are usually very
few of them (around say 200). I'm writing a query that looks like

construct {
    ?va  adm:hasactivityon ?d .
} where {
    ?le adm:logDate ?d .
     FILTER(?d > "2020-08-01T00:00:00"^^xsd:dateTime)
    ?va adm:logEntry ?le .
}

But it's too slow for our purpose (3.5s). I suspect it's conceptually
simple to have very performant implementation (using an index
dedicated to xsd:dateTime literal that could be queried), but I also
suspect SPARQL doesn't make that kind of performant algorithm to
summon in such a query (which is a mix of a bgp and a filter instead
of a direct call to a performant index).

So a few questions:
- are there other ways to write this query to make it more performant?
- my impression is that what I want with time is similar to what
GeoSPARQL provides for space... is there something similar to
GeoSPARQL for time?
- would that kind of performant index require the same type of
mechanism as the jena:text extension?
- is it worth reporting this on the SPARQL 1.2 github repo?

Thanks in advance,
-- 
Elie

Reply via email to