-
Notifications
You must be signed in to change notification settings - Fork 58
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
MariaDB does not use INDEX #147
Comments
This is very much the same issue (just different strategy?): #142 |
@codeliner or @basz do you have time for that? |
nope, sorry |
@kochen Can you try to provide a PR? |
@codeliner I could try, but the problems I see are these:
Any input is more than welcome. |
Maybe add a method indexArrays():string[] to the mariadb persistence
strategies, and when metadata matcher is used for query building, you check
against indexed arrays and use them as normal fields if needed.
Just a quick idea.
…On Wed, May 2, 2018, 15:04 MtK ***@***.***> wrote:
@codeliner <https://github.com/codeliner> I could try, but the problems I
see are these:
1. As you mentioned here #142 (comment)
<#142 (comment)>
the call to the createWhereClause method is done by the
AggregateRepository which is infrastructure agnostic and it uses
_aggregate_id & _aggregate_type & _aggregate_version which are the
Metadata keys instead of the aggregate_id & aggregate_type &
aggregate_version which are the direct columns.
2. therefore, since the MySQLEventStore code is identical to the
MariaDBEventStore , I am not sure how it generate a *different* form
of the same query - @prolic <https://github.com/prolic> maybe you
could dig into that on the MySQL side (don't have it set up locally)?
Any input is more than welcome.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYEvL7ZFhK2DPydM-em49JlAQ9pTwbMks5tuVprgaJpZM4TsiJC>
.
|
Here is a quick and dirty but simpler solution that works! |
To prevent this type of issues in future major releases, I would suggest to create queries always in "Strategies". This way we could react to platform issues without breaking other implementations. Also, this add a simpler way to add micro optimizations in queries for prooph component users. |
I have investigated in this issue 20 minutes and see no way to fix it without a bc break. Sorry :/ |
@oqq for the moment it'll be pathed for MariaDB only, and for the next Major release we might "have to" break BC - even though we could introduce an |
@prolic @codeliner according to this: http://rpbouman.blogspot.nl/2015/11/mysql-few-observations-on-json-type.html we should expect the same issue on MySQL as well. |
When querying for aggregates this query is being used:
Unlike MySQL, MariaDB doesn't use indexes in these case, therefor the actual columns (which already exists) need to be used.
This causes the query to run in ~1s. Running it multiple times for various checks... huge performance impact.
Changing manually the query to:
works as expected and runs in ~0.01s!
For reference:
https://benjaminlistwon.com/blog/working-with-json-data-in-mysql-part-1-of-3/ (INDEXING AND EFFICIENCY)
The text was updated successfully, but these errors were encountered: