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
Improve Store::getInProperty performance, refs 1234 #2461
Conversation
This requires either @kghbln One thing to be noted is due to the added indices, the |
@mwjames This surely will come out with a bang! The performance improvements seen are quite impressive! WOW!
We should note this is the RELEASE NOTES in any case. |
# (#1234) | ||
# | ||
# @since 3.0 | ||
# @default false |
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.
@mwjames Shouldn't this say SMW_EL_INPROP
?
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.
See #2758
Well, the setting is internal in case something seems fishy in order
to easily switch back and compare results without reworking the whole
code from the inside.
I hope that by the time of SMW 3.0 the setting can vanish and yes, the
default value is different.
…On 7/12/17, Karsten Hoffmeyer ***@***.***> wrote:
kghbln commented on this pull request.
> @@ -1495,4 +1495,18 @@
'smwgEntityCollation' => 'identity',
##
+ ##
+ # Entity lookup specific features
+ #
+ # - SMW_EL_NONE applies no query or schema changes
+ #
+ # - SMW_EL_INPROP enables a new query form for selecting incoming
properties
+ # (#1234)
+ #
+ # @SInCE 3.0
+ # @default false
@mwjames Shouldn't this say `SMW_EL_INPROP`
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#2461 (review)
|
You mean the whole |
This PR is made in reference to: #1234
This PR addresses or contains:
Store::getInProperties
performance with a significant improvement in query execution time by extending theINNER JOIN
with a subquery to pre-select and filter possible matches before being materialized. One example entity with > 100 incoming properties and an overall table size that covers ~1M triples demonstrated the following changes pre/post this PR.841.3639ms
↘39.1431ms
)1282.6319ms
↘59.8922ms
)... WHERE smw_id IN (SELECT p_id FROM mediawiki."smw_di_wikipage" WHERE o_id='19683’);
did not create the expected improvement on MySQL hence a different query was selected that showed favorable query plans on both MySQL and Postgres.To eliminate filesort and other expensive operations we needed to:
ORDER BY
as it is expected to returns all matches and sort the results during a post processingTested on:
This PR includes: