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

[BUGFIX] Use identifier_hash in CloudinaryScanService (#38) #41

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

dhuf
Copy link
Member

@dhuf dhuf commented Dec 4, 2023

  • [BUGFIX] Use identifier_hash in CloudinaryScanService

The fileExistsInStorage() method currently performs a SQL query to count records, but suffers from slow performance due to the absence of an index on the identifier field. This results in a full table scan.

To address this issue, this commit refactors the method to utilize the pre-existing identifier_hash field, specifically designed for efficient data searches.

* [BUGFIX] Use identifier_hash in CloudinaryScanService

The `fileExistsInStorage()` method currently performs a SQL query to count
records, but suffers from slow performance due to the absence of an index on
the `identifier` field. This results in a full table scan.

To address this issue, this commit refactors the method to utilize the
pre-existing `identifier_hash` field, specifically designed for efficient data
searches.
---------
Co-authored-by: Daniel Huf <[email protected]>
Co-authored-by: Hannes Lau <[email protected]>
@dhuf dhuf requested a review from jrenggli December 4, 2023 11:12
@jrenggli jrenggli merged commit 3a18002 into master Dec 5, 2023
3 of 5 checks passed
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