New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(api-v1): Optimise link value queries for Fuseki (DSP-1243) #1791
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, I just have one point, please see the comment.
case Some(objectIri) => { | ||
|
||
BIND(IRI("@objectIri") AS ?object) | ||
BIND(IRI("@linkValueIri") AS ?linkValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line 50 and 72 below, you are using <@linkValueIri>
not the ?linkValue
, is the bind here really necessary?
I see that ?linkValue
is used in Select
, so if for that purpose BIND is necessary, why not use ?linkValue
in the other statements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bind is there only so we can return ?linkValue
in SELECT
. Using an IRI literal instead of a variable improves performance, so I changed all the variables to literals wherever possible in these queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this optimization!
Thanks for reviewing! |
This PR improves the performance of the API v1 SPARQL queries that find link values when using Fuseki.
BIND
.FILTER NOT EXISTS
to checkknora-base:isDeleted
(as in enhancement(api-v2): Optimise checking isDeleted (DSP-848) #1739).resolves DSP-1243