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 index on DeviceConnection table #3178

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented Dec 16, 2020

This PR improves the performances of the Device retrieval when DeviceConnection are to be fetched.

Related Issue
None

Description of the solution adopted
The JOIN performed was matching device.connection_id = device_connection.id.
On dvc_device_connection there are only indexes that starts with scope_id.
For some (forgotten) reasons dvc_device_connection has the PK as (scope_id,id).
All of this results in a full search on the DeviceConnection table which kills performances.
Adding this index, access changes from full search to using the index, which is very very fast.

Screenshots
None

Any side note on the changes made
None

Signed-off-by: coduz <alberto.codutti@eurotech.com>
@Coduz Coduz added the Enhancement This PR/Issue improves an part of Kapua label Dec 16, 2020
@Coduz Coduz merged commit ba51416 into eclipse:develop Dec 16, 2020
@Coduz Coduz deleted the feature-addDeviceConnectionIndexId branch February 5, 2021 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants