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

Index required on input_id and output_id on DbLink table #2557

Closed
sphuber opened this issue Mar 4, 2019 · 1 comment
Closed

Index required on input_id and output_id on DbLink table #2557

sphuber opened this issue Mar 4, 2019 · 1 comment
Assignees
Labels
priority/important topic/database-schema type/accepted feature approved feature request type/performance Issue related to how quickly AiiDA works
Milestone

Comments

@sphuber
Copy link
Contributor

sphuber commented Mar 4, 2019

The engine often makes calls to get_incoming (for example when computing the hash) and get_outgoing, when it has to add new outputs and during link validation. These require a query on the DbLink table on the output_id and input_id column, neither of which have an index. This makes these operations very expensive for bigger databases and for my production database of more than 10 million links, the engine grinds to a halt.

@sphuber
Copy link
Contributor Author

sphuber commented Mar 4, 2019

Fixed in PR #2561

@sphuber sphuber closed this as completed Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/important topic/database-schema type/accepted feature approved feature request type/performance Issue related to how quickly AiiDA works
Projects
None yet
Development

No branches or pull requests

1 participant