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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow property path query for disjunctive form #725
Comments
Just looked into this some more, and it's not a problem after all. |
Thanks for reporting! |
Thanks for reporting! |
Thanks for reporting! |
@rubensworks I'm currently exploring using Comunica and I have sub-optimal query plans and can't find any documentation about anything that would enable me to tell Cumunica specific costs, is that even a thing? If yes/no, how would you advise I explore having more optimal plans? To be more specific, I have the following query:
However, I get the following first match instead:
Given the cardinality is very high, it results in very slow queries. |
@sroze Your issues sounds more related to #548. Comunica internally has a cost-based plan optimizer using the Currently, BGPs are always handled by this actor: https://github.com/comunica/comunica/tree/master/packages/actor-query-operation-bgp-left-deep-smallest |
@rubensworks thank you for your answer; I've managed to make it work well with cost metadata for the above query 馃帀 However, I end up with the same problem with the following query:
Am I right thinking that this is because the |
Nice, how did you end up doing it?
Indeed, that join will likely be sub-optimal. #552 will indeed be required to optimize that (many good techniques exist already, so it's just a matter of implementing them here). |
I'm using a RDF/JS store so I had to implement the
Do you have anything to point me towards? I'd be very keen to work on such an implementation. In terms of concrete steps, shall I be looking at replacing |
Great, that's a good way to do it indeed.
Not sure what your background is, but this may be helpfull to get started in the domain of query optimization: https://www.rubensworks.net/raw/slides/2021/ugent-webfundamentals-sparqlengines/ I think a good first step would be create a new BGP actor that is able to work using different join algorithms (#427). Happy to give you further guidance if your willing to take this up! (other communication mediums may be better in that case...) |
@rubensworks that's wonderful, I reached out to you on Gitter. |
This significantly improves performance of property path queries Closes #725
Will be much faster in Comunica 2.x |
Issue type:
Description:
This property path query is very slow:
http://query.linkeddatafragments.org/#transientDatasources=http%3A%2F%2Ffragments.dbpedia.org%2F2016-04%2Fen&query=SELECT%20%3Fperson%0AWHERE%20%7B%0A%20%20%5B%20rdfs%3Alabel%20%22Bruce%20Willis%22%40en%20%5D%0A%20%20%20%20(dbpedia-owl%3Aspouse%7Cdbpedia-owl%3Achild)%20%5B%20rdfs%3Alabel%20%3Fperson%20%5D.%0A%7D
Related to #709.
Environment:
Comunica version: 1.16.2
The text was updated successfully, but these errors were encountered: