Skip to content
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

Added preserves_order flag to SQL mapping table #585

Merged
1 commit merged into from
Nov 25, 2021

Conversation

puehringer
Copy link
Contributor

A long time ago, the preserves_mapping attribute was added as performance improvement to enable bulk-id-mappings. Bulk-id-mappings was disabled before as some mappers could not guarantee that the order of incoming ids == order of outgoing ids. Read more about it here: phovea/phovea_server#141

This PR sets this flag in the sql-mapping table, as this mapper guarantees a preserved order.
The performance increase is huge when testing with many items, as previously a query was sent to the database for every single id. As a test with human genes, ~60k queries were sent... Now, a single query with a large where is sent instead.

I added a comment to the line which ensures a preserved order.

@puehringer puehringer requested review from thinkh and a user November 25, 2021 09:00
@puehringer puehringer assigned thinkh and ghost Nov 25, 2021
@ghost ghost merged commit 515e5d5 into develop Nov 25, 2021
@ghost ghost deleted the mp/sql_mapping_table_preserves_order branch November 25, 2021 09:51
@dvvanessastoiber dvvanessastoiber mentioned this pull request Dec 15, 2021
2 tasks
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants