Skip to content

[BUGFIX] Use identifier_hash in CloudinaryScanService#38

Merged
dhuf merged 5 commits intotask/update-cloudinary-to-version-2from
fix/cloudinary-scan-service-full-table-scan
Nov 21, 2023
Merged

[BUGFIX] Use identifier_hash in CloudinaryScanService#38
dhuf merged 5 commits intotask/update-cloudinary-to-version-2from
fix/cloudinary-scan-service-full-table-scan

Conversation

@jrenggli
Copy link
Copy Markdown
Member

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.

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.
@jrenggli jrenggli requested review from SomeBdyElse and dhuf November 16, 2023 21:30
@dhuf dhuf force-pushed the fix/cloudinary-scan-service-full-table-scan branch 7 times, most recently from 7b20f50 to c673899 Compare November 20, 2023 14:08
@dhuf dhuf force-pushed the fix/cloudinary-scan-service-full-table-scan branch from 1e0cb08 to 7b877a3 Compare November 20, 2023 14:18
@dhuf dhuf merged commit df696eb into task/update-cloudinary-to-version-2 Nov 21, 2023
@dhuf dhuf deleted the fix/cloudinary-scan-service-full-table-scan branch November 21, 2023 09:10
dhuf added a commit that referenced this pull request 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.
---------
Co-authored-by: Daniel Huf <daniel.huf@visol.ch>
Co-authored-by: Hannes Lau <SomeBdyElse@users.noreply.github.com>
jrenggli added a commit that referenced this pull request Dec 5, 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.
---------
Co-authored-by: Daniel Huf <daniel.huf@visol.ch>
Co-authored-by: Hannes Lau <SomeBdyElse@users.noreply.github.com>
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.

3 participants