-
Notifications
You must be signed in to change notification settings - Fork 192
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
Adding nodes to group optimisation using SQLA code to generate SQL INSERT #2518
Adding nodes to group optimisation using SQLA code to generate SQL INSERT #2518
Conversation
d16af0f
to
482ea6a
Compare
Here you go: I put 10k nodes and I disabled the warning
to be able to export this (on commit f8c0191). P.S. It seems to me that on from aiida.plugins import DataFactory
pd=DataFactory('parameter')
from aiida.orm import QueryBuilder
qb=QueryBuilder()
qb.append(pd)
res = qb.all() |
Did you also test the performance of the import in both backends (and group addition)? |
I didn't test import speed on provenance_redesign |
482ea6a
to
5340674
Compare
Things are better than I expected regarding speed (I imported to both backend the provided import file by Leopold) Django
SQLA
|
If you don't have any more comments, please merge it. |
Ok, so to summarize: I'd be happy to merge this but I think we should get the OK from either @sphuber or @giovannipizzi as well. |
@ltalirz That's a good point... When I mentioned that the speed is better than what I expected, I looked only at the import speed of Django vs SQLA at the current implementation & branch. And indeed, here SQLA import is just 50% slower than Django import (when I expected Django to be 4 times faster than SQLA given that this group_addition optimisation is slower than the raw SQL optimization that we did at #2471). I didn't compare the numbers with the 0.12 implementation (#2471) - thanks for doing this - and I am surprised a bit. My expectation is Django to have similar speed to #2471 and SQLA to be 2 times slower than the SQLA implementation of #2471 |
…des the option to bypass the SQLA ORM and speed up the addition of nodes to a group. This option is only available at the Backend and therefore only to users who need this speedup (the ORM level users should not be aware of such options). Import SQLA was modified to use this optimisation.
5340674
to
c386e06
Compare
@szoupanos From your last message it is not entirely clear whether you still intend to work on this. Could you perhaps let us know? |
I would say no for the moment since I understand that the current overall performance is still acceptable for you (and the performance of the optimized SQLA import is much better than non-optimized SQLA import that we had). I think that this is OK for 1beta and let's assess our goals for 1.0 given the limited time that we have (e.g. I think that it is worth the effort to try to implement Django JSONB than continuing to investigate this). |
This is an implementation for issue #1319 using SQLA code to generate the SQL INSERT statement.
It would be nice to test its performance too (@ltalirz if you can easily provide your 5800 parameter data export file at 0.4 version, it would help a lot)