Skip to content

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

@pheyvaer

Description

@pheyvaer

Issue type:

  • 🐌 Performance issue

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions