comunica / comunica-feature-link-traversal

📬 Comunica packages for link traversal-based query execution
Other
8 stars 11 forks source link

Adding `rdf:type ?type` to my query slows it down a lot #112

Open pheyvaer opened 1 year ago

pheyvaer commented 1 year ago

Issue type:


Description:

I have this query

PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT * WHERE {
    ?s schema:contributor <https://data.knows.idlab.ugent.be/project/solidlab>.

  OPTIONAL {
    ?s schema:name ?name; rdf:type ?type
  }
}

which takes long to execute, at least more than 500s. When I remove the rdf:type ?type from the OPTIONAL it takes around 21s.

PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT * WHERE {
    ?s schema:contributor <https://data.knows.idlab.ugent.be/project/solidlab>.

  OPTIONAL {
    ?s schema:name ?name
  }
}

I used the online client.


Environment:

I used an online client.

rubensworks commented 1 year ago

Some notes from mattermost:

That's a consequence of the cMatch semantics for determining whether or not to follow links to other pods.

This one is faster: https://comunica.github.io/comunica-feature-link-traversal-web-clients/builds/solid-single-pod/