Skip to content

Federated Queries with Wikidata are very slow #396

@TTG3333

Description

@TTG3333

I tried the following command, which I think is rather simple, and it took 137 seconds to run. In comparison, the same command without the SERVICE or FILTER parts takes 33.9 seconds to run.

SELECT ?archive ?archiveName ?archiveID ?archiveInception
WHERE {
  GRAPH <https://www.diamm.ac.uk/> {
    ?archive wdt:P2888 ?archiveID .
    ?archive rdfs:label ?archiveName .
  FILTER (STRSTARTS(STR(?archive), "https://www.diamm.ac.uk/archives/"))
  }

  SERVICE <https://query.wikidata.org/sparql> {
    ?archiveID wdt:P571 ?archiveInception .
  }

  FILTER (?archiveInception >= "1900-01-01T00:00:00Z"^^xsd:dateTime)
}

Such delays means that any queries that are minimally more complex will take a very long time to run, and this is something we should look into seeing how we can speed it up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions